diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 427553d13ebf3..224061c822a99 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -350,6 +350,9 @@ extern { link_name = "opendir$INODE64$UNIX2003")] #[cfg_attr(target_os = "netbsd", link_name = "__opendir30")] pub fn opendir(dirname: *const c_char) -> *mut ::DIR; + #[cfg_attr(target_os = "macos", link_name = "readdir$INODE64")] + #[cfg_attr(target_os = "netbsd", link_name = "__readdir30")] + pub fn readdir(dirp: *mut ::DIR) -> *const ::dirent; #[cfg_attr(target_os = "macos", link_name = "readdir_r$INODE64")] #[cfg_attr(target_os = "netbsd", link_name = "__readdir_r30")] pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent, diff --git a/src/unix/solaris/mod.rs b/src/unix/solaris/mod.rs index 5a15f81286ddb..1247917bc27d9 100644 --- a/src/unix/solaris/mod.rs +++ b/src/unix/solaris/mod.rs @@ -1017,7 +1017,6 @@ extern { buflen: ::c_int) -> *const passwd; pub fn setpwent(); pub fn getpwent() -> *mut passwd; - pub fn readdir(dirp: *mut ::DIR) -> *const ::dirent; pub fn fdatasync(fd: ::c_int) -> ::c_int; pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char; pub fn duplocale(base: ::locale_t) -> ::locale_t;