diff --git a/src/libcore/libc.rs b/src/libcore/libc.rs index 7f293b98e24a921e5b75e17a83af38c6d8ef9f25..a25beb9132f435a3bfba858006af0732cf01f294 100644 --- a/src/libcore/libc.rs +++ b/src/libcore/libc.rs @@ -1396,6 +1396,15 @@ pub mod dirent { #[cfg(target_os = "android")] #[cfg(target_os = "freebsd")] unsafe fn readdir(dirp: *DIR) -> *dirent_t; + + unsafe fn closedir(dirp: *DIR) -> c_int; + unsafe fn rewinddir(dirp: *DIR); + unsafe fn seekdir(dirp: *DIR, loc: c_long); + unsafe fn telldir(dirp: *DIR) -> c_long; + } + + #[cfg(target_word_size = "64")] + pub extern { // on OSX (particularly when running with a // 64bit kernel), we have an issue where there // are separate bindings for opendir and readdir, @@ -1406,11 +1415,17 @@ pub mod dirent { #[cfg(target_os = "macos")] #[link_name = "readdir$INODE64"] unsafe fn readdir(dirp: *DIR) -> *dirent_t; - - unsafe fn closedir(dirp: *DIR) -> c_int; - unsafe fn rewinddir(dirp: *DIR); - unsafe fn seekdir(dirp: *DIR, loc: c_long); - unsafe fn telldir(dirp: *DIR) -> c_long; + } + #[cfg(target_word_size = "32")] + pub extern { + // on OSX (particularly when running with a + // 64bit kernel), we have an issue where there + // are separate bindings for opendir and readdir, + // which we have to explicitly link, as below. + #[cfg(target_os = "macos")] + unsafe fn opendir(dirname: *c_char) -> *DIR; + #[cfg(target_os = "macos")] + unsafe fn readdir(dirp: *DIR) -> *dirent_t; } } diff --git a/src/libuv b/src/libuv index 576ab1db8ea03889eb7b2274654afe7c5c867230..218ab86721eefd7b7e97fa6d9f95a80a1fa8686c 160000 --- a/src/libuv +++ b/src/libuv @@ -1 +1 @@ -Subproject commit 576ab1db8ea03889eb7b2274654afe7c5c867230 +Subproject commit 218ab86721eefd7b7e97fa6d9f95a80a1fa8686c