Skip to content

Commit d79a44f

Browse files
committed
Added doc comment w/ links explaining the difference between 32-bit and 64-bit libc for readdir_r
1 parent 1c1e677 commit d79a44f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/unix/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,12 @@ extern {
609609
#[cfg_attr(target_os = "macos", link_name = "readdir$INODE64")]
610610
#[cfg_attr(target_os = "netbsd", link_name = "__readdir30")]
611611
#[cfg_attr(target_os = "freebsd", link_name = "readdir@FBSD_1.0")]
612+
/// The 64-bit libc on Solaris and illumos only has readdir_r. If a
613+
/// 32-bit Solaris or illumos target is ever created, it should use
614+
/// __posix_readdir_r. See libc(3LIB) on Solaris or illumos:
615+
/// https://illumos.org/man/3lib/libc
616+
/// https://docs.oracle.com/cd/E36784_01/html/E36873/libc-3lib.html
617+
/// https://www.unix.com/man-page/opensolaris/3LIB/libc/
612618
pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent;
613619
#[cfg_attr(target_os = "macos", link_name = "readdir_r$INODE64")]
614620
#[cfg_attr(target_os = "netbsd", link_name = "__readdir_r30")]

0 commit comments

Comments
 (0)