Skip to content
Snippets Groups Projects
Commit e0100781 authored by Raph Levien's avatar Raph Levien
Browse files

Make readdir available on all unix targets

The readdir_r call has problems, and we'll probably want to move to
readdir on many, if not most, unix targets. This patch makes readdir
available in unix, rather than just solaris as before.

See https://github.com/rust-lang/rust/issues/40021
parent 8d8264b9
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment