Skip to content

Commit 8c18844

Browse files
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`.
1 parent c2d5c64 commit 8c18844

File tree

1 file changed

+3
-0
lines changed
  • library/std/src/sys/unix

1 file changed

+3
-0
lines changed

library/std/src/sys/unix/fs.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1562,6 +1562,9 @@ mod remove_dir_impl {
15621562
}
15631563

15641564
pub unsafe fn fdopendir(fd: c_int) -> *mut DIR {
1565+
#[cfg(all(target_os = "macos", target_arch = "x86"))]
1566+
weak!(fn fdopendir(c_int) -> *mut DIR, "fdopendir$INODE64$UNIX2003");
1567+
#[cfg(all(target_os = "macos", target_arch = "x86_64"))]
15651568
weak!(fn fdopendir(c_int) -> *mut DIR, "fdopendir$INODE64");
15661569
fdopendir.get().map(|fdopendir| fdopendir(fd)).unwrap_or_else(|| {
15671570
crate::sys::unix::os::set_errno(libc::ENOSYS);

0 commit comments

Comments
 (0)