Fix build on i686-apple-darwin systems
On 32-bit systems, fdopendir is called `_fdopendir$INODE64$UNIX2003`. On 64-bit systems, fdopendir is called `_fdopendir$INODE64`.
This commit is contained in:
parent
c2d5c64132
commit
8c18844324
1 changed files with 3 additions and 0 deletions
|
@ -1562,6 +1562,9 @@ mod remove_dir_impl {
|
|||
}
|
||||
|
||||
pub unsafe fn fdopendir(fd: c_int) -> *mut DIR {
|
||||
#[cfg(all(target_os = "macos", target_arch = "x86"))]
|
||||
weak!(fn fdopendir(c_int) -> *mut DIR, "fdopendir$INODE64$UNIX2003");
|
||||
#[cfg(all(target_os = "macos", target_arch = "x86_64"))]
|
||||
weak!(fn fdopendir(c_int) -> *mut DIR, "fdopendir$INODE64");
|
||||
fdopendir.get().map(|fdopendir| fdopendir(fd)).unwrap_or_else(|| {
|
||||
crate::sys::unix::os::set_errno(libc::ENOSYS);
|
||||
|
|
Loading…
Add table
Reference in a new issue