@@ -1493,7 +1493,7 @@ impl fmt::Debug for File {
14931493 readlink ( & p) . ok ( )
14941494 }
14951495
1496- #[ cfg( target_os = "macos " ) ]
1496+ #[ cfg( target_vendor = "apple " ) ]
14971497 fn get_path ( fd : c_int ) -> Option < PathBuf > {
14981498 // FIXME: The use of PATH_MAX is generally not encouraged, but it
14991499 // is inevitable in this case because macOS defines `fcntl` with
@@ -1538,12 +1538,12 @@ impl fmt::Debug for File {
15381538
15391539 #[ cfg( not( any(
15401540 target_os = "linux" ,
1541- target_os = "macos" ,
15421541 target_os = "vxworks" ,
15431542 all( target_os = "freebsd" , target_arch = "x86_64" ) ,
15441543 target_os = "netbsd" ,
15451544 target_os = "illumos" ,
1546- target_os = "solaris"
1545+ target_os = "solaris" ,
1546+ target_vendor = "apple" ,
15471547 ) ) ) ]
15481548 fn get_path ( _fd : c_int ) -> Option < PathBuf > {
15491549 // FIXME(#24570): implement this for other Unix platforms
@@ -1552,12 +1552,12 @@ impl fmt::Debug for File {
15521552
15531553 #[ cfg( any(
15541554 target_os = "linux" ,
1555- target_os = "macos" ,
15561555 target_os = "freebsd" ,
15571556 target_os = "hurd" ,
15581557 target_os = "netbsd" ,
15591558 target_os = "openbsd" ,
1560- target_os = "vxworks"
1559+ target_os = "vxworks" ,
1560+ target_vendor = "apple" ,
15611561 ) ) ]
15621562 fn get_mode ( fd : c_int ) -> Option < ( bool , bool ) > {
15631563 let mode = unsafe { libc:: fcntl ( fd, libc:: F_GETFL ) } ;
@@ -1574,12 +1574,12 @@ impl fmt::Debug for File {
15741574
15751575 #[ cfg( not( any(
15761576 target_os = "linux" ,
1577- target_os = "macos" ,
15781577 target_os = "freebsd" ,
15791578 target_os = "hurd" ,
15801579 target_os = "netbsd" ,
15811580 target_os = "openbsd" ,
1582- target_os = "vxworks"
1581+ target_os = "vxworks" ,
1582+ target_vendor = "apple" ,
15831583 ) ) ) ]
15841584 fn get_mode ( _fd : c_int ) -> Option < ( bool , bool ) > {
15851585 // FIXME(#24570): implement this for other Unix platforms
0 commit comments