Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This fixes issue #1318 - on Solarish systems __posix_readdir_r is only #1319

Merged
merged 3 commits into from
Apr 20, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,11 +609,15 @@ extern {
#[cfg_attr(target_os = "macos", link_name = "readdir$INODE64")]
#[cfg_attr(target_os = "netbsd", link_name = "__readdir30")]
#[cfg_attr(target_os = "freebsd", link_name = "readdir@FBSD_1.0")]
/// The 64-bit libc on Solaris and illumos only has readdir_r. If a
jasonbking marked this conversation as resolved.
Show resolved Hide resolved
/// 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(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")]
pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent,
result: *mut *mut ::dirent) -> ::c_int;
Expand Down