File tree Expand file tree Collapse file tree 3 files changed +237
-97
lines changed Expand file tree Collapse file tree 3 files changed +237
-97
lines changed Original file line number Diff line number Diff line change @@ -3307,6 +3307,20 @@ fn test_neutrino(target: &str) {
3307
3307
assert ! ( target. contains( "nto-qnx" ) ) ;
3308
3308
3309
3309
let mut cfg = ctest_cfg ( ) ;
3310
+ if target. ends_with ( "_iosock" ) {
3311
+ let qnx_target_val = std:: env:: var ( "QNX_TARGET" )
3312
+ . unwrap_or_else ( |_| "QNX_TARGET_not_set_please_source_qnxsdp" . into ( ) ) ;
3313
+
3314
+ cfg. include ( qnx_target_val + "/usr/include/io-sock" ) ;
3315
+ headers ! { cfg:
3316
+ "io-sock.h" ,
3317
+ "sys/types.h" ,
3318
+ "sys/socket.h" ,
3319
+ "sys/sysctl.h" ,
3320
+ "net/if.h" ,
3321
+ "net/if_arp.h"
3322
+ }
3323
+ }
3310
3324
3311
3325
headers ! { cfg:
3312
3326
"ctype.h" ,
@@ -3464,6 +3478,9 @@ fn test_neutrino(target: &str) {
3464
3478
// Does not exist in Neutrino
3465
3479
"locale_t" => true ,
3466
3480
3481
+ // FIXME: "'__uint128' undeclared" in C
3482
+ "__uint128" => true ,
3483
+
3467
3484
_ => false ,
3468
3485
}
3469
3486
} ) ;
@@ -3527,6 +3544,9 @@ fn test_neutrino(target: &str) {
3527
3544
// stack unwinding bug.
3528
3545
"__my_thread_exit" => true ,
3529
3546
3547
+ // Wrong const-ness
3548
+ "dl_iterate_phdr" => true ,
3549
+
3530
3550
_ => false ,
3531
3551
}
3532
3552
} ) ;
Original file line number Diff line number Diff line change @@ -334,7 +334,13 @@ pub const ATF_PERM: c_int = 0x04;
334
334
pub const ATF_PUBL : c_int = 0x08 ;
335
335
pub const ATF_USETRAILERS : c_int = 0x10 ;
336
336
337
- pub const FNM_PERIOD : c_int = 1 << 2 ;
337
+ cfg_if ! {
338
+ if #[ cfg( target_os = "nto" ) ] {
339
+ pub const FNM_PERIOD : c_int = 1 << 1 ;
340
+ } else {
341
+ pub const FNM_PERIOD : c_int = 1 << 2 ;
342
+ }
343
+ }
338
344
pub const FNM_NOMATCH : c_int = 1 ;
339
345
340
346
cfg_if ! {
@@ -354,9 +360,22 @@ cfg_if! {
354
360
target_os = "cygwin" ,
355
361
) ) ] {
356
362
pub const FNM_PATHNAME : c_int = 1 << 1 ;
357
- pub const FNM_NOESCAPE : c_int = 1 << 0 ;
358
363
} else {
359
364
pub const FNM_PATHNAME : c_int = 1 << 0 ;
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" ) ] {
377
+ pub const FNM_NOESCAPE : c_int = 1 << 2 ;
378
+ } else {
360
379
pub const FNM_NOESCAPE : c_int = 1 << 1 ;
361
380
}
362
381
}
You can’t perform that action at this time.
0 commit comments