summaryrefslogtreecommitdiff
path: root/libc-test
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2016-11-13 08:45:59 -0700
committerAlan Somers <asomers@gmail.com>2016-11-15 20:54:43 -0700
commit9860c2935ae859039b98360956688d8cf9f70d9d (patch)
tree161568d0bb9b73f9791ba6a8b5382eb1bfe0adbe /libc-test
parenta3baaf6a9562ac9a37d03807cdbc15cba5fc34fb (diff)
downloadrust-libc-9860c2935ae859039b98360956688d8cf9f70d9d.tar.gz
Fix tests on FreeBSD 11
FreeBSD svn r262489 removed some *_MAXID definitions in sys/sysctl.h. They never should've been used outside of the FreeBSD base system anyway. Mark them as deprecated, hide them from the API docs, and disable their tests. r273250 removed MAP_RENAME and MAP_NORESERVE, flags used by mmap(2), but old binaries that use them will still work. Suppress their test errors. r294930 changed stack_t.ss_sp from a char* to a void*. Suppress its test error.
Diffstat (limited to 'libc-test')
-rw-r--r--libc-test/build.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index a1bd3d98c4..817de568f2 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -361,6 +361,19 @@ fn main() {
"QFMT_VFS_OLD" |
"QFMT_VFS_V0" if mips && linux => true,
+ // These constants were removed in FreeBSD 11 (svn r273250) but will
+ // still be accepted and ignored at runtime.
+ "MAP_RENAME" |
+ "MAP_NORESERVE" if freebsd => true,
+
+ // These constants were removed in FreeBSD 11 (svn r262489),
+ // and they've never had any legitimate use outside of the
+ // base system anyway.
+ "CTL_MAXID" |
+ "KERN_MAXID" |
+ "HW_MAXID" |
+ "USER_MAXID" if freebsd => true,
+
_ => false,
}
});
@@ -461,7 +474,9 @@ fn main() {
// sigval is actually a union, but we pretend it's a struct
(struct_ == "sigevent" && field == "sigev_value") ||
// aio_buf is "volatile void*" and Rust doesn't understand volatile
- (struct_ == "aiocb" && field == "aio_buf")
+ (struct_ == "aiocb" && field == "aio_buf") ||
+ // stack_t.ss_sp's type changed from FreeBSD 10 to 11 in svn r294930
+ (freebsd && struct_ == "stack_t" && field == "ss_sp")
});
cfg.skip_field(move |struct_, field| {