From 9860c2935ae859039b98360956688d8cf9f70d9d Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sun, 13 Nov 2016 08:45:59 -0700 Subject: 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. --- libc-test/build.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'libc-test') 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| { -- cgit v1.2.1