Skip to content

Commit 04d93c9

Browse files
committed
Merge pull request #136 from jimblandy/eventfd-whitelist
Skip C/Rust type checks for eventfd.
2 parents 95d6a00 + f8772f7 commit 04d93c9

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

libc-test/build.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ fn main() {
306306
});
307307

308308
cfg.skip_fn(move |name| {
309-
// skip those that are manually verifiedmanually verified
309+
// skip those that are manually verified
310310
match name {
311311
"execv" | // crazy stuff with const/mut
312312
"execve" |
@@ -348,6 +348,22 @@ fn main() {
348348
"ptrace" |
349349
"sigaltstack" if rumprun => true,
350350

351+
// There seems to be a small error in EGLIBC's eventfd.h header. The
352+
// [underlying system call][1] always takes its first `count`
353+
// argument as an `unsigned int`, but [EGLIBC's <sys/eventfd.h>
354+
// header][2] declares it to take an `int`. [GLIBC's header][3]
355+
// matches the kernel.
356+
//
357+
// EGLIBC is no longer actively developed, and Debian, the largest
358+
// distribution that had been using it, switched back to GLIBC in
359+
// April 2015. So effectively all Linux <sys/eventfd.h> headers will
360+
// be using `unsigned int` soon.
361+
//
362+
// [1]: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/fs/eventfd.c?id=refs/tags/v3.12.51#n397
363+
// [2]: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/eglibc/trusty/view/head:/sysdeps/unix/sysv/linux/sys/eventfd.h
364+
// [3]: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sys/eventfd.h;h=6295f32e937e779e74318eb9d3bdbe76aef8a8f3;hb=4e42b5b8f89f0e288e68be7ad70f9525aebc2cff#l34
365+
"eventfd" if linux => true,
366+
351367
_ => false,
352368
}
353369
});

0 commit comments

Comments
 (0)