File tree 10 files changed +26
-18
lines changed
10 files changed +26
-18
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,7 @@ fn main() {
199
199
}
200
200
201
201
if linux || android {
202
+ cfg. header ( "asm/mman.h" ) ;
202
203
cfg. header ( "malloc.h" ) ;
203
204
cfg. header ( "net/ethernet.h" ) ;
204
205
cfg. header ( "netpacket/packet.h" ) ;
@@ -459,6 +460,11 @@ fn main() {
459
460
// asm/termios.h and ioctl.h (+ some other headers) because of redeclared types.
460
461
"CMSPAR" if mips && linux && !musl => true ,
461
462
463
+ // On mips Linux targets, MADV_SOFT_OFFLINE is currently missing, though it's been added but CI has too old
464
+ // of a Linux version. Since it exists on all other Linux targets, just ignore this for now and remove once
465
+ // it's been fixed in CI.
466
+ "MADV_SOFT_OFFLINE" if mips && linux => true ,
467
+
462
468
_ => false ,
463
469
}
464
470
} ) ;
Original file line number Diff line number Diff line change 28
28
pub st_birthtime_nsec: :: c_long,
29
29
}
30
30
}
31
+
32
+ pub const MAP_32BIT : :: c_int = 0x00080000 ;
Original file line number Diff line number Diff line change 28
28
pub st_birthtime_nsec: :: c_long,
29
29
}
30
30
}
31
+
32
+ pub const MAP_32BIT : :: c_int = 0x00080000 ;
Original file line number Diff line number Diff line change @@ -743,6 +743,10 @@ f! {
743
743
pub fn dirfd( dirp: * mut :: DIR ) -> :: c_int {
744
744
unsafe { * ( dirp as * const :: c_int) }
745
745
}
746
+
747
+ pub fn WIFCONTINUED ( status: :: c_int) -> bool {
748
+ status == 0xffff
749
+ }
746
750
}
747
751
748
752
extern {
Original file line number Diff line number Diff line change @@ -583,6 +583,12 @@ pub const SOCK_CLOEXEC: ::c_int = 0x8000;
583
583
pub const SOCK_NONBLOCK : :: c_int = 0x4000 ;
584
584
pub const SOCK_DNS : :: c_int = 0x1000 ;
585
585
586
+ f ! {
587
+ pub fn WIFCONTINUED ( status: :: c_int) -> bool {
588
+ status & 0o177777 == 0o177777
589
+ }
590
+ }
591
+
586
592
extern {
587
593
pub fn dirfd ( dirp : * mut :: DIR ) -> :: c_int ;
588
594
pub fn getnameinfo ( sa : * const :: sockaddr ,
Original file line number Diff line number Diff line change @@ -581,8 +581,6 @@ pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
581
581
pub const TMPFS_MAGIC : :: c_long = 0x01021994 ;
582
582
pub const USBDEVICE_SUPER_MAGIC : :: c_long = 0x00009fa2 ;
583
583
584
- pub const MADV_HUGEPAGE : :: c_int = 14 ;
585
- pub const MADV_NOHUGEPAGE : :: c_int = 15 ;
586
584
pub const MAP_HUGETLB : :: c_int = 0x040000 ;
587
585
588
586
pub const PTRACE_TRACEME : :: c_int = 0 ;
Original file line number Diff line number Diff line change @@ -185,14 +185,8 @@ pub const PTRACE_INTERRUPT: ::c_int = 0x4207;
185
185
pub const PTRACE_LISTEN : :: c_int = 0x4208 ;
186
186
pub const PTRACE_PEEKSIGINFO : :: c_int = 0x4209 ;
187
187
188
- pub const MADV_DODUMP : :: c_int = 17 ;
189
- pub const MADV_DONTDUMP : :: c_int = 16 ;
190
-
191
188
pub const EPOLLWAKEUP : :: c_int = 0x20000000 ;
192
189
193
- pub const MADV_HUGEPAGE : :: c_int = 14 ;
194
- pub const MADV_NOHUGEPAGE : :: c_int = 15 ;
195
-
196
190
pub const PTRACE_GETFPREGS : :: c_uint = 14 ;
197
191
pub const PTRACE_SETFPREGS : :: c_uint = 15 ;
198
192
pub const PTRACE_GETFPXREGS : :: c_uint = 18 ;
Original file line number Diff line number Diff line change @@ -410,13 +410,8 @@ pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
410
410
pub const PTRACE_LISTEN : :: c_uint = 0x4208 ;
411
411
pub const PTRACE_PEEKSIGINFO : :: c_uint = 0x4209 ;
412
412
413
- pub const MADV_DODUMP : :: c_int = 17 ;
414
- pub const MADV_DONTDUMP : :: c_int = 16 ;
415
-
416
413
pub const EPOLLWAKEUP : :: c_int = 0x20000000 ;
417
414
418
- pub const MADV_HUGEPAGE : :: c_int = 14 ;
419
- pub const MADV_NOHUGEPAGE : :: c_int = 15 ;
420
415
pub const MAP_HUGETLB : :: c_int = 0x040000 ;
421
416
422
417
pub const SEEK_DATA : :: c_int = 3 ;
Original file line number Diff line number Diff line change @@ -698,13 +698,8 @@ pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
698
698
pub const PTRACE_LISTEN : :: c_uint = 0x4208 ;
699
699
pub const PTRACE_PEEKSIGINFO : :: c_uint = 0x4209 ;
700
700
701
- pub const MADV_DODUMP : :: c_int = 17 ;
702
- pub const MADV_DONTDUMP : :: c_int = 16 ;
703
-
704
701
pub const EPOLLWAKEUP : :: c_int = 0x20000000 ;
705
702
706
- pub const MADV_HUGEPAGE : :: c_int = 14 ;
707
- pub const MADV_NOHUGEPAGE : :: c_int = 15 ;
708
703
pub const MAP_HUGETLB : :: c_int = 0x040000 ;
709
704
710
705
pub const EFD_NONBLOCK : :: c_int = 0x800 ;
Original file line number Diff line number Diff line change @@ -411,12 +411,18 @@ pub const MADV_RANDOM: ::c_int = 1;
411
411
pub const MADV_SEQUENTIAL : :: c_int = 2 ;
412
412
pub const MADV_WILLNEED : :: c_int = 3 ;
413
413
pub const MADV_DONTNEED : :: c_int = 4 ;
414
+ pub const MADV_FREE : :: c_int = 8 ;
414
415
pub const MADV_REMOVE : :: c_int = 9 ;
415
416
pub const MADV_DONTFORK : :: c_int = 10 ;
416
417
pub const MADV_DOFORK : :: c_int = 11 ;
417
418
pub const MADV_MERGEABLE : :: c_int = 12 ;
418
419
pub const MADV_UNMERGEABLE : :: c_int = 13 ;
420
+ pub const MADV_HUGEPAGE : :: c_int = 14 ;
421
+ pub const MADV_NOHUGEPAGE : :: c_int = 15 ;
422
+ pub const MADV_DONTDUMP : :: c_int = 16 ;
423
+ pub const MADV_DODUMP : :: c_int = 17 ;
419
424
pub const MADV_HWPOISON : :: c_int = 100 ;
425
+ pub const MADV_SOFT_OFFLINE : :: c_int = 101 ;
420
426
421
427
pub const IFF_UP : :: c_int = 0x1 ;
422
428
pub const IFF_BROADCAST : :: c_int = 0x2 ;
You can’t perform that action at this time.
0 commit comments