summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@red-bean.com>2016-01-12 16:28:07 -0800
committerJim Blandy <jimb@red-bean.com>2016-01-12 16:28:07 -0800
commitf8772f7e524d67c76c64ee74e5ce7b681758e8aa (patch)
tree83e2a46bd45f859b698b14d0783da830fd6ab418
parent95d6a00134f284e6b889d98f4c2cb4b285950327 (diff)
downloadrust-libc-f8772f7e524d67c76c64ee74e5ce7b681758e8aa.tar.gz
Skip C/Rust type checks for eventfd.
-rw-r--r--libc-test/build.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index fb6fa42dbd..1a071e68ae 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -306,7 +306,7 @@ fn main() {
});
cfg.skip_fn(move |name| {
- // skip those that are manually verifiedmanually verified
+ // skip those that are manually verified
match name {
"execv" | // crazy stuff with const/mut
"execve" |
@@ -348,6 +348,22 @@ fn main() {
"ptrace" |
"sigaltstack" if rumprun => true,
+ // There seems to be a small error in EGLIBC's eventfd.h header. The
+ // [underlying system call][1] always takes its first `count`
+ // argument as an `unsigned int`, but [EGLIBC's <sys/eventfd.h>
+ // header][2] declares it to take an `int`. [GLIBC's header][3]
+ // matches the kernel.
+ //
+ // EGLIBC is no longer actively developed, and Debian, the largest
+ // distribution that had been using it, switched back to GLIBC in
+ // April 2015. So effectively all Linux <sys/eventfd.h> headers will
+ // be using `unsigned int` soon.
+ //
+ // [1]: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/fs/eventfd.c?id=refs/tags/v3.12.51#n397
+ // [2]: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/eglibc/trusty/view/head:/sysdeps/unix/sysv/linux/sys/eventfd.h
+ // [3]: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sys/eventfd.h;h=6295f32e937e779e74318eb9d3bdbe76aef8a8f3;hb=4e42b5b8f89f0e288e68be7ad70f9525aebc2cff#l34
+ "eventfd" if linux => true,
+
_ => false,
}
});