diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-03-12 15:27:45 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-03-12 15:27:45 -0700 |
| commit | b60c3bfa4a95fecae2f28929f22f38865d7e5f79 (patch) | |
| tree | 4257710d963193348a89371338a2edea05643921 /src | |
| parent | 806732a70bbe5fec5121b630a957549a5ddd57e8 (diff) | |
| download | rust-b60c3bfa4a95fecae2f28929f22f38865d7e5f79.tar.gz rust-b60c3bfa4a95fecae2f28929f22f38865d7e5f79.zip | |
libcore: Attempt to put out burning tree on Mac by using the old symbol on 32 bit. rs=bustage
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/libc.rs | 25 | ||||
| m--------- | src/libuv | 0 |
2 files changed, 20 insertions, 5 deletions
diff --git a/src/libcore/libc.rs b/src/libcore/libc.rs index 7f293b98e24..a25beb9132f 100644 --- a/src/libcore/libc.rs +++ b/src/libcore/libc.rs @@ -1396,6 +1396,15 @@ pub mod funcs { #[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 funcs { #[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 -Subproject 576ab1db8ea03889eb7b2274654afe7c5c86723 +Subproject 218ab86721eefd7b7e97fa6d9f95a80a1fa8686 |
