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 @@ -3033,6 +3033,20 @@ fn test_neutrino(target: &str) {
3033
3033
assert ! ( target. contains( "nto-qnx" ) ) ;
3034
3034
3035
3035
let mut cfg = ctest_cfg ( ) ;
3036
+ if target. ends_with ( "_iosock" ) {
3037
+ let qnx_target_val = std:: env:: var ( "QNX_TARGET" )
3038
+ . unwrap_or_else ( |_| "QNX_TARGET_not_set_please_source_qnxsdp" . into ( ) ) ;
3039
+
3040
+ cfg. include ( qnx_target_val + "/usr/include/io-sock" ) ;
3041
+ headers ! { cfg:
3042
+ "io-sock.h" ,
3043
+ "sys/types.h" ,
3044
+ "sys/socket.h" ,
3045
+ "sys/sysctl.h" ,
3046
+ "net/if.h" ,
3047
+ "net/if_arp.h"
3048
+ }
3049
+ }
3036
3050
3037
3051
headers ! { cfg:
3038
3052
"ctype.h" ,
@@ -3190,6 +3204,9 @@ fn test_neutrino(target: &str) {
3190
3204
// Does not exist in Neutrino
3191
3205
"locale_t" => true ,
3192
3206
3207
+ // FIXME: "'__uint128' undeclared" in C
3208
+ "__uint128" => true ,
3209
+
3193
3210
_ => false ,
3194
3211
}
3195
3212
} ) ;
@@ -3250,6 +3267,9 @@ fn test_neutrino(target: &str) {
3250
3267
// stack unwinding bug.
3251
3268
"__my_thread_exit" => true ,
3252
3269
3270
+ // Wrong const-ness
3271
+ "dl_iterate_phdr" => true ,
3272
+
3253
3273
_ => false ,
3254
3274
}
3255
3275
} ) ;
Original file line number Diff line number Diff line change @@ -335,7 +335,13 @@ pub const ATF_PERM: c_int = 0x04;
335
335
pub const ATF_PUBL : c_int = 0x08 ;
336
336
pub const ATF_USETRAILERS : c_int = 0x10 ;
337
337
338
- pub const FNM_PERIOD : c_int = 1 << 2 ;
338
+ cfg_if ! {
339
+ if #[ cfg( target_os = "nto" ) ] {
340
+ pub const FNM_PERIOD : c_int = 1 << 1 ;
341
+ } else {
342
+ pub const FNM_PERIOD : c_int = 1 << 2 ;
343
+ }
344
+ }
339
345
pub const FNM_NOMATCH : c_int = 1 ;
340
346
341
347
cfg_if ! {
@@ -354,9 +360,22 @@ cfg_if! {
354
360
target_os = "openbsd" ,
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