Skip to content

Commit 7940c40

Browse files
committed
Document what is wrong with sighandler_t
1 parent 2aee049 commit 7940c40

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

libc-test/build.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,15 +1348,16 @@ fn test_android(target: &str) {
13481348
s if s.ends_with("_nsec") && struct_.starts_with("stat") => {
13491349
s.to_string()
13501350
}
1351+
// FIXME: appears that `epoll_event.data` is an union
13511352
"u64" if struct_ == "epoll_event" => "data.u64".to_string(),
13521353
s => s.to_string(),
13531354
}
13541355
});
13551356

13561357
cfg.skip_type(move |ty| {
13571358
match ty {
1358-
// sighandler_t is crazy across platforms
1359-
// FIXME: still necessary?
1359+
// FIXME: `sighandler_t` type is incorrect, see:
1360+
// https://github.com/rust-lang/libc/issues/1359
13601361
"sighandler_t" => true,
13611362
_ => false,
13621363
}
@@ -1419,8 +1420,15 @@ fn test_android(target: &str) {
14191420
// this is actually a union on linux, so we can't represent it well and
14201421
// just insert some padding.
14211422
(struct_ == "siginfo_t" && field == "_pad") ||
1423+
// FIXME: `sa_sigaction` has type `sighandler_t` but that type is
1424+
// incorrect, see: https://github.com/rust-lang/libc/issues/1359
1425+
(struct_ == "sigaction" && field == "sa_sigaction") ||
14221426
// sigev_notify_thread_id is actually part of a sigev_un union
1423-
(struct_ == "sigevent" && field == "sigev_notify_thread_id")
1427+
(struct_ == "sigevent" && field == "sigev_notify_thread_id") ||
1428+
// signalfd had SIGSYS fields added in Android 4.19, but CI does not have that version yet.
1429+
(struct_ == "signalfd_siginfo" && (field == "ssi_syscall" ||
1430+
field == "ssi_call_addr" ||
1431+
field == "ssi_arch"))
14241432
});
14251433

14261434
cfg.generate("../src/lib.rs", "main.rs");

0 commit comments

Comments
 (0)