File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -1788,6 +1788,14 @@ fn test_android(target: &str) {
1788
1788
// kernel 5.10 minimum required
1789
1789
"MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ" | "MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ" => true ,
1790
1790
1791
+ // kernel 5.18 minimum
1792
+ | "MADV_COLD"
1793
+ | "MADV_DONTNEED_LOCKED"
1794
+ | "MADV_PAGEOUT"
1795
+ | "MADV_POPULATE_READ"
1796
+ | "MADV_POPULATE_WRITE" => true ,
1797
+
1798
+
1791
1799
_ => false ,
1792
1800
}
1793
1801
} ) ;
@@ -3714,13 +3722,20 @@ fn test_linux(target: &str) {
3714
3722
// Added in Linux 5.13
3715
3723
"PTRACE_GET_RSEQ_CONFIGURATION" if sparc64 => true ,
3716
3724
3725
+ | "MADV_COLD"
3726
+ | "MADV_PAGEOUT"
3727
+ | "MADV_POPULATE_READ"
3728
+ | "MADV_POPULATE_WRITE"
3729
+ if musl => true ,
3730
+
3717
3731
// FIXME: Requires more recent kernel headers
3718
3732
| "IFLA_PARENT_DEV_NAME" // linux v5.13+
3719
3733
| "IFLA_PARENT_DEV_BUS_NAME" // linux v5.13+
3720
3734
| "IFLA_GRO_MAX_SIZE" // linux v5.16+
3721
3735
| "IFLA_TSO_MAX_SIZE" // linux v5.18+
3722
3736
| "IFLA_TSO_MAX_SEGS" // linux v5.18+
3723
3737
| "IFLA_ALLMULTI" // linux v6.0+
3738
+ | "MADV_DONTNEED_LOCKED" // linux v5.18+
3724
3739
=> true ,
3725
3740
"SCTP_FUTURE_ASSOC" | "SCTP_CURRENT_ASSOC" | "SCTP_ALL_ASSOC" | "SCTP_PEER_ADDR_THLDS_V2" => true , // linux 5.5+
3726
3741
Original file line number Diff line number Diff line change @@ -1286,22 +1286,29 @@ LOG_FTP
1286
1286
LOG_NFACILITIES
1287
1287
LOG_PERROR
1288
1288
L_tmpnam
1289
+ MADV_COLD
1289
1290
MADV_DODUMP
1290
1291
MADV_DOFORK
1291
1292
MADV_DONTDUMP
1292
1293
MADV_DONTFORK
1293
1294
MADV_DONTNEED
1295
+ MADV_DONTNEED_LOCKED
1294
1296
MADV_FREE
1295
1297
MADV_HUGEPAGE
1296
1298
MADV_HWPOISON
1299
+ MADV_KEEPONFORK
1297
1300
MADV_MERGEABLE
1298
1301
MADV_NOHUGEPAGE
1299
1302
MADV_NORMAL
1303
+ MADV_PAGEOUT
1304
+ MADV_POPULATE_READ
1305
+ MADV_POPULATE_WRITE
1300
1306
MADV_RANDOM
1301
1307
MADV_REMOVE
1302
1308
MADV_SEQUENTIAL
1303
1309
MADV_UNMERGEABLE
1304
1310
MADV_WILLNEED
1311
+ MADV_WIPEONFORK
1305
1312
MAP_DENYWRITE
1306
1313
MAP_EXECUTABLE
1307
1314
MAP_FILE
Original file line number Diff line number Diff line change @@ -654,7 +654,18 @@ pub const MADV_HUGEPAGE: ::c_int = 14;
654
654
pub const MADV_NOHUGEPAGE : :: c_int = 15 ;
655
655
pub const MADV_DONTDUMP : :: c_int = 16 ;
656
656
pub const MADV_DODUMP : :: c_int = 17 ;
657
+ pub const MADV_WIPEONFORK : :: c_int = 18 ;
658
+ pub const MADV_KEEPONFORK : :: c_int = 19 ;
659
+ pub const MADV_COLD : :: c_int = 20 ;
660
+ pub const MADV_PAGEOUT : :: c_int = 21 ;
657
661
pub const MADV_HWPOISON : :: c_int = 100 ;
662
+ cfg_if ! {
663
+ if #[ cfg( not( target_os = "emscripten" ) ) ] {
664
+ pub const MADV_POPULATE_READ : :: c_int = 22 ;
665
+ pub const MADV_POPULATE_WRITE : :: c_int = 23 ;
666
+ pub const MADV_DONTNEED_LOCKED : :: c_int = 24 ;
667
+ }
668
+ }
658
669
659
670
pub const IFF_UP : :: c_int = 0x1 ;
660
671
pub const IFF_BROADCAST : :: c_int = 0x2 ;
You can’t perform that action at this time.
0 commit comments