diff --git a/libc-test/build.rs b/libc-test/build.rs index 14745a72a5486..712b239ef8e35 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -3273,6 +3273,12 @@ fn test_linux(target: &str) { // Needs musl 1.2.3 or later. "pthread_getname_np" if musl => true, + // pthread_sigqueue uses sigval, which was initially declared + // as a struct but should be defined as a union. However due + // to the issues described here: https://github.com/rust-lang/libc/issues/2816 + // it can't be changed from struct. + "pthread_sigqueue" => true, + _ => false, } }); diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs index 9e8a88a58c04a..88bc935f632b3 100644 --- a/src/unix/linux_like/linux/gnu/mod.rs +++ b/src/unix/linux_like/linux/gnu/mod.rs @@ -1291,6 +1291,7 @@ extern "C" { attr: *mut ::pthread_rwlockattr_t, val: ::c_int, ) -> ::c_int; + pub fn pthread_sigqueue(thread: ::pthread_t, sig: ::c_int, value: ::sigval) -> ::c_int; pub fn mallinfo() -> ::mallinfo; pub fn mallinfo2() -> ::mallinfo2; pub fn malloc_info(options: ::c_int, stream: *mut ::FILE) -> ::c_int;