File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -500,7 +500,7 @@ fn main() {
500
500
"backtrace" |
501
501
"sysinfo" | "newlocale" | "duplocale" | "freelocale" | "uselocale" |
502
502
"nl_langinfo_l" | "wcslen" | "wcstombs" if uclibc => true ,
503
-
503
+
504
504
// Apparently res_init exists on Android, but isn't defined in a header:
505
505
// https://mail.gnome.org/archives/commits-list/2013-May/msg01329.html
506
506
"res_init" if android => true ,
@@ -511,6 +511,9 @@ fn main() {
511
511
// https://github.com/rust-lang/libc/pull/585#discussion_r114561460
512
512
"res_init" if apple => true ,
513
513
514
+ // On Mac we don't use the default `close()`, instead using their $NOCANCEL variants.
515
+ "close" if apple => true ,
516
+
514
517
_ => false ,
515
518
}
516
519
} ) ;
Original file line number Diff line number Diff line change @@ -405,7 +405,9 @@ extern {
405
405
pub fn lchown ( path : * const c_char , uid : uid_t ,
406
406
gid : gid_t ) -> :: c_int ;
407
407
#[ cfg_attr( all( target_os = "macos" , target_arch = "x86" ) ,
408
- link_name = "close$UNIX2003" ) ]
408
+ link_name = "close$NOCANCEL$UNIX2003" ) ]
409
+ #[ cfg_attr( all( target_os = "macos" , target_arch = "x86_64" ) ,
410
+ link_name = "close$NOCANCEL" ) ]
409
411
pub fn close ( fd : :: c_int ) -> :: c_int ;
410
412
pub fn dup ( fd : :: c_int ) -> :: c_int ;
411
413
pub fn dup2 ( src : :: c_int , dst : :: c_int ) -> :: c_int ;
You can’t perform that action at this time.
0 commit comments