diff options
author | bors <bors@rust-lang.org> | 2019-04-20 07:11:00 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2019-04-20 07:11:00 +0000 |
commit | dfda3b0d01939e42e5f05999cb8692624b1d8077 (patch) | |
tree | 039899bc3a7ad5d30a9d96c6d2ebcc4f13861540 | |
parent | a79c2d4d78bfc49776a506557df3f64730cdebfd (diff) | |
parent | e45fa4a217c5501e427404980c5f0db712730f58 (diff) | |
download | rust-libc-dfda3b0d01939e42e5f05999cb8692624b1d8077.tar.gz |
Auto merge of #1319 - jasonbking:readdir, r=gnzlbg
This fixes issue #1318 - on Solarish systems __posix_readdir_r is only
defined for 32-bit Solarish targets. Since rust doesn't currently support 32-bit Solarish targets, the line is both unnecessary and wrong.
As found with the latest fd binary, removing the line fixed the fd build (and fd then works as expected).
-rw-r--r-- | src/unix/mod.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 15f7c7f2ea..1be0095343 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -612,9 +612,13 @@ extern { pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent; #[cfg_attr(target_os = "macos", link_name = "readdir_r$INODE64")] #[cfg_attr(target_os = "netbsd", link_name = "__readdir_r30")] - #[cfg_attr(any(target_os = "solaris", target_os = "illumos"), - link_name = "__posix_readdir_r")] #[cfg_attr(target_os = "freebsd", link_name = "readdir_r@FBSD_1.0")] + /// The 64-bit libc on Solaris and illumos only has readdir_r. If a + /// 32-bit Solaris or illumos target is ever created, it should use + /// __posix_readdir_r. See libc(3LIB) on Solaris or illumos: + /// https://illumos.org/man/3lib/libc + /// https://docs.oracle.com/cd/E36784_01/html/E36873/libc-3lib.html + /// https://www.unix.com/man-page/opensolaris/3LIB/libc/ pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent, result: *mut *mut ::dirent) -> ::c_int; #[cfg_attr(all(target_os = "macos", target_arch = "x86"), |