File tree 3 files changed +237
-97
lines changed
3 files changed +237
-97
lines changed Original file line number Diff line number Diff line change @@ -3220,6 +3220,20 @@ fn test_neutrino(target: &str) {
3220
3220
assert ! ( target. contains( "nto-qnx" ) ) ;
3221
3221
3222
3222
let mut cfg = ctest_cfg ( ) ;
3223
+ if target. ends_with ( "_iosock" ) {
3224
+ let qnx_target_val = std:: env:: var ( "QNX_TARGET" )
3225
+ . unwrap_or_else ( |_| "QNX_TARGET_not_set_please_source_qnxsdp" . into ( ) ) ;
3226
+
3227
+ cfg. include ( qnx_target_val + "/usr/include/io-sock" ) ;
3228
+ headers ! { cfg:
3229
+ "io-sock.h" ,
3230
+ "sys/types.h" ,
3231
+ "sys/socket.h" ,
3232
+ "sys/sysctl.h" ,
3233
+ "net/if.h" ,
3234
+ "net/if_arp.h"
3235
+ }
3236
+ }
3223
3237
3224
3238
headers ! { cfg:
3225
3239
"ctype.h" ,
@@ -3377,6 +3391,9 @@ fn test_neutrino(target: &str) {
3377
3391
// Does not exist in Neutrino
3378
3392
"locale_t" => true ,
3379
3393
3394
+ // FIXME: "'__uint128' undeclared" in C
3395
+ "__uint128" => true ,
3396
+
3380
3397
_ => false ,
3381
3398
}
3382
3399
} ) ;
@@ -3437,6 +3454,9 @@ fn test_neutrino(target: &str) {
3437
3454
// stack unwinding bug.
3438
3455
"__my_thread_exit" => true ,
3439
3456
3457
+ // Wrong const-ness
3458
+ "dl_iterate_phdr" => true ,
3459
+
3440
3460
_ => false ,
3441
3461
}
3442
3462
} ) ;
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 ! {
@@ -353,9 +359,22 @@ cfg_if! {
353
359
target_os = "openbsd" ,
354
360
) ) ] {
355
361
pub const FNM_PATHNAME : c_int = 1 << 1 ;
356
- pub const FNM_NOESCAPE : c_int = 1 << 0 ;
357
362
} else {
358
363
pub const FNM_PATHNAME : c_int = 1 << 0 ;
364
+ }
365
+ }
366
+
367
+ cfg_if ! {
368
+ if #[ cfg( any(
369
+ target_os = "macos" ,
370
+ target_os = "freebsd" ,
371
+ target_os = "android" ,
372
+ target_os = "openbsd" ,
373
+ ) ) ] {
374
+ pub const FNM_NOESCAPE : c_int = 1 << 0 ;
375
+ } else if #[ cfg( target_os = "nto" ) ] {
376
+ pub const FNM_NOESCAPE : c_int = 1 << 2 ;
377
+ } else {
359
378
pub const FNM_NOESCAPE : c_int = 1 << 1 ;
360
379
}
361
380
}
You can’t perform that action at this time.
0 commit comments