2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -704,7 +704,7 @@ pub fn page_size() -> usize {
704
704
//
705
705
// [posix_confstr]:
706
706
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/confstr.html
707
- #[ cfg( any ( target_os = "macos" , target_os = "ios" , target_os = "tvos" , target_os = "watchos" ) ) ]
707
+ #[ cfg( target_vendor = "apple" ) ]
708
708
fn confstr ( key : c_int , size_hint : Option < usize > ) -> io:: Result < OsString > {
709
709
let mut buf: Vec < u8 > = Vec :: new ( ) ;
710
710
let mut bytes_needed_including_nul = size_hint
@@ -765,7 +765,7 @@ fn darwin_temp_dir() -> PathBuf {
765
765
pub fn temp_dir ( ) -> PathBuf {
766
766
crate :: env:: var_os ( "TMPDIR" ) . map ( PathBuf :: from) . unwrap_or_else ( || {
767
767
cfg_if:: cfg_if! {
768
- if #[ cfg( any ( target_os = "macos" , target_os = "ios" , target_os = "tvos" , target_os = "watchos" ) ) ] {
768
+ if #[ cfg( target_vendor = "apple" ) ] {
769
769
darwin_temp_dir( )
770
770
} else if #[ cfg( target_os = "android" ) ] {
771
771
PathBuf :: from( "/data/local/tmp" )
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ fn test_parse_glibc_version() {
25
25
// Smoke check `confstr`, do it for several hint values, to ensure our resizing
26
26
// logic is correct.
27
27
#[ test]
28
- #[ cfg( target_os = "macos " ) ]
28
+ #[ cfg( target_vendor = "apple " ) ]
29
29
fn test_confstr ( ) {
30
30
for key in [ libc:: _CS_DARWIN_USER_TEMP_DIR, libc:: _CS_PATH] {
31
31
let value_nohint = super :: confstr ( key, None ) . unwrap_or_else ( |e| {
0 commit comments