File tree 3 files changed +173
-263
lines changed 3 files changed +173
-263
lines changed Original file line number Diff line number Diff line change @@ -3056,7 +3056,10 @@ fn test_neutrino(target: &str) {
3056
3056
3057
3057
let mut cfg = ctest_cfg ( ) ;
3058
3058
if target. ends_with ( "_iosock" ) {
3059
- cfg. include ( concat ! ( env!( "QNX_TARGET" ) , "/usr/include/io-sock" ) ) ;
3059
+ let qnx_target_val = std:: env:: var ( "QNX_TARGET" )
3060
+ . unwrap_or_else ( |_| "QNX_TARGET_not_set_please_source_qnxsdp" . into ( ) ) ;
3061
+
3062
+ cfg. include ( qnx_target_val + "/usr/include/io-sock" ) ;
3060
3063
headers ! { cfg:
3061
3064
"io-sock.h" ,
3062
3065
"sys/types.h" ,
Original file line number Diff line number Diff line change @@ -337,8 +337,8 @@ pub const ATF_USETRAILERS: c_int = 0x10;
337
337
338
338
cfg_if ! {
339
339
if #[ cfg( target_os = "nto" ) ] {
340
- pub const FNM_PERIOD : c_int = 1 << 1 ; }
341
- else {
340
+ pub const FNM_PERIOD : c_int = 1 << 1 ;
341
+ } else {
342
342
pub const FNM_PERIOD : c_int = 1 << 2 ;
343
343
}
344
344
}
@@ -360,12 +360,22 @@ cfg_if! {
360
360
target_os = "openbsd" ,
361
361
) ) ] {
362
362
pub const FNM_PATHNAME : c_int = 1 << 1 ;
363
- pub const FNM_NOESCAPE : c_int = 1 << 0 ;
364
363
} else {
365
364
pub const FNM_PATHNAME : c_int = 1 << 0 ;
366
- #[ cfg( target_os = "nto" ) ]
365
+ }
366
+ }
367
+
368
+ cfg_if ! {
369
+ if #[ cfg( any(
370
+ target_os = "macos" ,
371
+ target_os = "freebsd" ,
372
+ target_os = "android" ,
373
+ target_os = "openbsd" ,
374
+ ) ) ] {
375
+ pub const FNM_NOESCAPE : c_int = 1 << 0 ;
376
+ } else if #[ cfg( target_os = "nto" ) ] {
367
377
pub const FNM_NOESCAPE : c_int = 1 << 2 ;
368
- # [ cfg ( not ( target_os = "nto" ) ) ]
378
+ } else {
369
379
pub const FNM_NOESCAPE : c_int = 1 << 1 ;
370
380
}
371
381
}
You can’t perform that action at this time.
0 commit comments