Skip to content

Commit bd4c348

Browse files
committed
Add QFMT_VFS_V1 on MIPS and test all QFMT_ constants
1 parent 3520512 commit bd4c348

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

libc-test/build.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -416,12 +416,6 @@ fn main() {
416416
"NOTE_EXIT_REPARENTED" |
417417
"NOTE_REAP" if apple => true,
418418

419-
// The linux/quota.h header file which defines these can't be
420-
// included with sys/quota.h currently on MIPS, so we don't include
421-
// it and just ignore these constants
422-
"QFMT_VFS_OLD" |
423-
"QFMT_VFS_V0" if mips && linux => true,
424-
425419
// These constants were removed in FreeBSD 11 (svn r273250) but will
426420
// still be accepted and ignored at runtime.
427421
"MAP_RENAME" |
@@ -477,6 +471,7 @@ fn main() {
477471
// are header conflicts if we try to include the headers that define them here.
478472
"F_CANCELLK" | "F_ADD_SEALS" | "F_GET_SEALS" => true,
479473
"F_SEAL_SEAL" | "F_SEAL_SHRINK" | "F_SEAL_GROW" | "F_SEAL_WRITE" => true,
474+
"QFMT_VFS_OLD" | "QFMT_VFS_V0" | "QFMT_VFS_V1" if mips && linux => true, // Only on MIPS
480475

481476
_ => false,
482477
}
@@ -667,10 +662,12 @@ fn main() {
667662
} else {
668663
cfg.header("linux/fcntl.h");
669664
}
665+
cfg.header("linux/quota.h");
670666
cfg.skip_const(move |name| {
671667
match name {
672668
"F_CANCELLK" | "F_ADD_SEALS" | "F_GET_SEALS" => false,
673669
"F_SEAL_SEAL" | "F_SEAL_SHRINK" | "F_SEAL_GROW" | "F_SEAL_WRITE" => false,
670+
"QFMT_VFS_OLD" | "QFMT_VFS_V0" | "QFMT_VFS_V1" if mips && linux => false,
674671
_ => true,
675672
}
676673
});

src/unix/notbsd/linux/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,7 @@ pub const EPOLLONESHOT: ::c_int = 0x40000000;
717717

718718
pub const QFMT_VFS_OLD: ::c_int = 1;
719719
pub const QFMT_VFS_V0: ::c_int = 2;
720+
pub const QFMT_VFS_V1: ::c_int = 4;
720721

721722
pub const EFD_SEMAPHORE: ::c_int = 0x1;
722723

src/unix/notbsd/linux/musl/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
159159

160160
pub const CPU_SETSIZE: ::c_int = 128;
161161

162-
pub const QFMT_VFS_V1: ::c_int = 4;
163-
164162
pub const PTRACE_TRACEME: ::c_int = 0;
165163
pub const PTRACE_PEEKTEXT: ::c_int = 1;
166164
pub const PTRACE_PEEKDATA: ::c_int = 2;

src/unix/notbsd/linux/other/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,6 @@ pub const VEOF: usize = 4;
385385

386386
pub const CPU_SETSIZE: ::c_int = 0x400;
387387

388-
pub const QFMT_VFS_V1: ::c_int = 4;
389-
390388
pub const PTRACE_TRACEME: ::c_uint = 0;
391389
pub const PTRACE_PEEKTEXT: ::c_uint = 1;
392390
pub const PTRACE_PEEKDATA: ::c_uint = 2;

src/unix/notbsd/linux/s390x.rs

-2
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,6 @@ pub const CPU_SETSIZE: ::c_int = 0x400;
698698

699699
pub const EXTPROC: ::tcflag_t = 0x00010000;
700700

701-
pub const QFMT_VFS_V1: ::c_int = 4;
702-
703701
pub const PTRACE_TRACEME: ::c_uint = 0;
704702
pub const PTRACE_PEEKTEXT: ::c_uint = 1;
705703
pub const PTRACE_PEEKDATA: ::c_uint = 2;

0 commit comments

Comments
 (0)