diff --git a/libc-test/build.rs b/libc-test/build.rs index 1173f665fb56..2927837976f9 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -42,6 +42,8 @@ fn do_cc() { || target.contains("l4re") || target.contains("android") || target.contains("emscripten") + || target.contains("solaris") + || target.contains("illumos") { cc::Build::new().file("src/sigrt.c").compile("sigrt"); } diff --git a/libc-test/semver/solarish.txt b/libc-test/semver/solarish.txt index 3e672ebfb3f1..5603201070f3 100644 --- a/libc-test/semver/solarish.txt +++ b/libc-test/semver/solarish.txt @@ -16,6 +16,8 @@ LIO_WAIT LIO_WRITE PIPE_BUF SIGEV_PORT +SIGRTMAX +SIGRTMIN _POSIX_VDISABLE _ST_FSTYPSZ aio_cancel diff --git a/libc-test/test/sigrt.rs b/libc-test/test/sigrt.rs index 25e6ca4457b1..1f89ce042186 100644 --- a/libc-test/test/sigrt.rs +++ b/libc-test/test/sigrt.rs @@ -4,7 +4,9 @@ target_os = "linux", target_os = "l4re", target_os = "android", - target_os = "emscripten" + target_os = "emscripten", + target_os = "solaris", + target_os = "illumos", ))] mod t { use libc; diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index 0b223cd982cf..70e549a1b5d8 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -2542,6 +2542,14 @@ f! { } safe_f! { + pub fn SIGRTMAX() -> c_int { + unsafe { crate::sysconf(_SC_SIGRT_MAX) as c_int } + } + + pub fn SIGRTMIN() -> c_int { + unsafe { crate::sysconf(_SC_SIGRT_MIN) as c_int } + } + pub {const} fn WIFEXITED(status: c_int) -> bool { (status & 0xFF) == 0 }