@@ -2473,6 +2473,9 @@ fn test_emscripten(target: &str) {
2473
2473
// FIXME: is this necessary?
2474
2474
"sighandler_t" => true ,
2475
2475
2476
+ // FIXME: The size has been changed due to musl's time64
2477
+ "time_t" => true ,
2478
+
2476
2479
_ => false ,
2477
2480
}
2478
2481
} ) ;
@@ -2491,6 +2494,16 @@ fn test_emscripten(target: &str) {
2491
2494
// Skip for now to unblock CI.
2492
2495
"pthread_condattr_t" => true ,
2493
2496
2497
+ // FIXME: The size has been changed when upgraded to musl 1.2.2
2498
+ "pthread_mutex_t" => true ,
2499
+
2500
+ // FIXME: The size has been changed
2501
+ "max_align_t" => true ,
2502
+
2503
+ // FIXME: The size has been changed due to time64
2504
+ "utimbuf" | "timeval" | "timespec" | "rusage" | "itimerval" | "sched_param"
2505
+ | "stat" | "stat64" | "shmid_ds" | "msqid_ds" => true ,
2506
+
2494
2507
_ => false ,
2495
2508
}
2496
2509
} ) ;
@@ -2503,6 +2516,14 @@ fn test_emscripten(target: &str) {
2503
2516
// FIXME: Investigate why CI is missing it.
2504
2517
"clearenv" => true ,
2505
2518
2519
+ // FIXME: Somehow the ctest cannot find it on emscripten:
2520
+ // = note: error: undefined symbol: wait4 (referenced by top-level compiled C/C++ code)
2521
+ // warning: Link with `-sLLD_REPORT_UNDEFINED` to get more information on undefined symbols
2522
+ // warning: To disable errors for undefined symbols use `-sERROR_ON_UNDEFINED_SYMBOLS=0`
2523
+ // warning: _wait4 may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
2524
+ // Error: Aborting compilation due to previous errors
2525
+ "wait4" => true ,
2526
+
2506
2527
_ => false ,
2507
2528
}
2508
2529
} ) ;
@@ -2520,6 +2541,18 @@ fn test_emscripten(target: &str) {
2520
2541
// emscripten-core/emscripten@6d6474e
2521
2542
"SYS_gettid" => true ,
2522
2543
2544
+ // FIXME: These values have been changed
2545
+ | "POSIX_MADV_DONTNEED" // to 4
2546
+ | "RLIMIT_NLIMITS" // to 16
2547
+ | "RLIM_NLIMITS" // to 16
2548
+ | "IPPROTO_MAX" // to 263
2549
+ | "F_GETLK" // to 5
2550
+ | "F_SETLK" // to 6
2551
+ | "F_SETLKW" // to 7
2552
+ | "O_TMPFILE" // to 65
2553
+ | "SIG_IGN" // -1
2554
+ => true ,
2555
+
2523
2556
_ => false ,
2524
2557
}
2525
2558
} ) ;
@@ -2703,14 +2736,15 @@ fn test_linux(target: &str) {
2703
2736
let mips = target. contains ( "mips" ) ;
2704
2737
let mips32 = mips && !target. contains ( "64" ) ;
2705
2738
let mips64 = mips && target. contains ( "64" ) ;
2739
+ let ppc = target. contains ( "powerpc" ) ;
2706
2740
let ppc64 = target. contains ( "powerpc64" ) ;
2707
2741
let s390x = target. contains ( "s390x" ) ;
2708
2742
let sparc64 = target. contains ( "sparc64" ) ;
2709
2743
let x32 = target. contains ( "x32" ) ;
2710
2744
let x86_32 = target. contains ( "i686" ) ;
2711
2745
let x86_64 = target. contains ( "x86_64" ) ;
2712
2746
let aarch64_musl = target. contains ( "aarch64" ) && musl;
2713
- let gnuabihf = target. contains ( "gnueabihf" ) ;
2747
+ let gnueabihf = target. contains ( "gnueabihf" ) ;
2714
2748
let x86_64_gnux32 = target. contains ( "gnux32" ) && x86_64;
2715
2749
let riscv64 = target. contains ( "riscv64" ) ;
2716
2750
let uclibc = target. contains ( "uclibc" ) ;
@@ -2815,9 +2849,9 @@ fn test_linux(target: &str) {
2815
2849
"errno.h" ,
2816
2850
// `sys/io.h` is only available on x86*, Alpha, IA64, and 32-bit
2817
2851
// ARM: https://bugzilla.redhat.com/show_bug.cgi?id=1116162
2818
- // Also unavailable on gnuabihf with glibc 2.30.
2852
+ // Also unavailable on gnueabihf with glibc 2.30.
2819
2853
// https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=6b33f373c7b9199e00ba5fbafd94ac9bfb4337b1
2820
- [ ( x86_64 || x86_32 || arm) && !gnuabihf ] : "sys/io.h" ,
2854
+ [ ( x86_64 || x86_32 || arm) && !gnueabihf ] : "sys/io.h" ,
2821
2855
// `sys/reg.h` is only available on x86 and x86_64
2822
2856
[ x86_64 || x86_32] : "sys/reg.h" ,
2823
2857
// sysctl system call is deprecated and not available on musl
@@ -2865,7 +2899,8 @@ fn test_linux(target: &str) {
2865
2899
"linux/netfilter_ipv6.h" ,
2866
2900
"linux/netfilter_ipv6/ip6_tables.h" ,
2867
2901
"linux/netlink.h" ,
2868
- "linux/openat2.h" ,
2902
+ // FIXME: requires Linux >= 5.6:
2903
+ [ !musl && !sparc64] : "linux/openat2.h" ,
2869
2904
[ !musl] : "linux/ptrace.h" ,
2870
2905
"linux/quota.h" ,
2871
2906
"linux/random.h" ,
@@ -2963,6 +2998,11 @@ fn test_linux(target: &str) {
2963
2998
// For internal use only, to define architecture specific ioctl constants with a libc specific type.
2964
2999
"Ioctl" => true ,
2965
3000
3001
+ // FIXME: requires >= 5.4.1 kernel headers
3002
+ "pgn_t" if musl => true ,
3003
+ "priority_t" if musl => true ,
3004
+ "name_t" if musl => true ,
3005
+
2966
3006
_ => false ,
2967
3007
}
2968
3008
} ) ;
@@ -3024,6 +3064,12 @@ fn test_linux(target: &str) {
3024
3064
// FIXME: requires >= 5.4.1 kernel headers
3025
3065
"j1939_filter" if musl => true ,
3026
3066
3067
+ // FIXME: requires >= 5.4 kernel headers
3068
+ "sockaddr_can" if musl => true ,
3069
+
3070
+ // FIXME: Unignore once we update Ubuntu to 22.04
3071
+ "mallinfo2" if sparc64 => true ,
3072
+
3027
3073
_ => false ,
3028
3074
}
3029
3075
} ) ;
@@ -3062,6 +3108,15 @@ fn test_linux(target: &str) {
3062
3108
return true ;
3063
3109
}
3064
3110
}
3111
+ if musl || sparc64 {
3112
+ // FIXME: Requires >= 5.4.1 kernel headers
3113
+ if name. starts_with ( "J1939" )
3114
+ || name. starts_with ( "SO_J1939" )
3115
+ || name. starts_with ( "SCM_J1939" )
3116
+ {
3117
+ return true ;
3118
+ }
3119
+ }
3065
3120
match name {
3066
3121
// These constants are not available if gnu headers have been included
3067
3122
// and can therefore not be tested here
@@ -3124,6 +3179,9 @@ fn test_linux(target: &str) {
3124
3179
// Not yet implemented on sparc64
3125
3180
"SYS_clone3" if mips | sparc64 => true ,
3126
3181
3182
+ // FIXME: Not defined on ARM, gnueabihf, MIPS, musl, PowerPC, riscv64, s390x, and sparc64.
3183
+ "SYS_memfd_secret" if arm | gnueabihf | mips | musl | ppc | riscv64 | s390x | sparc64 => true ,
3184
+
3127
3185
// FIXME: Added in Linux 5.16
3128
3186
// https://github.com/torvalds/linux/commit/039c0ec9bb77446d7ada7f55f90af9299b28ca49
3129
3187
"SYS_futex_waitv" => true ,
@@ -3195,6 +3253,64 @@ fn test_linux(target: &str) {
3195
3253
// https://github.com/torvalds/linux/commit/42df6e1d221dddc0f2acf2be37e68d553ad65f96
3196
3254
"NF_NETDEV_NUMHOOKS" => true ,
3197
3255
3256
+ // FIXME: requires Linux >= 5.6:
3257
+ | "RESOLVE_BENEATH"
3258
+ | "RESOLVE_CACHED"
3259
+ | "RESOLVE_IN_ROOT"
3260
+ | "RESOLVE_NO_MAGICLINKS"
3261
+ | "RESOLVE_NO_SYMLINKS"
3262
+ | "RESOLVE_NO_XDEV" if musl || sparc64 => true ,
3263
+
3264
+ // FIXME: requires Linux >= 5.4:
3265
+ | "CAN_J1939"
3266
+ | "CAN_NPROTO" if musl || sparc64 => true ,
3267
+
3268
+ // FIXME: requires Linux >= 5.6
3269
+ "GRND_INSECURE" if musl || sparc64 => true ,
3270
+
3271
+ // FIXME: requires Linux >= 5.7:
3272
+ "MREMAP_DONTUNMAP" if musl || sparc64 => true ,
3273
+
3274
+ // FIXME: Requires more recent kernel headers (5.9 / 5.11):
3275
+ | "CLOSE_RANGE_UNSHARE"
3276
+ | "CLOSE_RANGE_CLOEXEC" if musl || sparc64 => true ,
3277
+
3278
+ // FIXME: requires Linux >= 5.12:
3279
+ "MPOL_F_NUMA_BALANCING" if musl || sparc64 => true ,
3280
+
3281
+ // FIXME: Requires more recent kernel headers
3282
+ | "NFNL_SUBSYS_COUNT" // bumped in v5.14
3283
+ | "NFNL_SUBSYS_HOOK" // v5.14+
3284
+ | "NFULA_VLAN" // v5.4+
3285
+ | "NFULA_L2HDR" // v5.4+
3286
+ | "NFULA_VLAN_PROTO" // v5.4+
3287
+ | "NFULA_VLAN_TCI" // v5.4+
3288
+ | "NFULA_VLAN_UNSPEC" // v5.4+
3289
+ | "RTNLGRP_NEXTHOP" // linux v5.3+
3290
+ | "RTNLGRP_BRVLAN" // linux v5.6+
3291
+ if musl || sparc64 => true ,
3292
+
3293
+ // FIXME: Unignore once we update Ubuntu to 22.04
3294
+ | "VMADDR_CID_LOCAL"
3295
+ | "STATX_MNT_ID"
3296
+ | "SYS_close_range"
3297
+ | "SYS_openat2"
3298
+ | "SYS_pidfd_getfd"
3299
+ | "SYS_faccessat2"
3300
+ | "SYS_process_madvise"
3301
+ | "SYS_epoll_pwait2"
3302
+ | "SYS_mount_setattr"
3303
+ | "SYS_quotactl_fd"
3304
+ | "SYS_landlock_create_ruleset"
3305
+ | "SYS_landlock_add_rule"
3306
+ | "SYS_landlock_restrict_self"
3307
+ | "SYS_process_mrelease"
3308
+ | "IFLA_PROP_LIST"
3309
+ | "IFLA_ALT_IFNAME"
3310
+ | "IFLA_PERM_ADDRESS"
3311
+ | "IFLA_PROTO_DOWN_REASON"
3312
+ if sparc64 => true ,
3313
+
3198
3314
_ => false ,
3199
3315
}
3200
3316
} ) ;
0 commit comments