summaryrefslogtreecommitdiff
path: root/libc-test/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'libc-test/build.rs')
-rw-r--r--libc-test/build.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 1d1f953080..1e602618ae 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -8,9 +8,16 @@ use std::env;
fn do_cc() {
let target = env::var("TARGET").unwrap();
if cfg!(unix) {
- let exclude = ["wasi", "solaris", "illumos"];
+ let exclude = ["wasi"];
if !exclude.iter().any(|x| target.contains(x)) {
- cc::Build::new().file("src/cmsg.c").compile("cmsg");
+ let mut cmsg = cc::Build::new();
+
+ cmsg.file("src/cmsg.c");
+
+ if target.contains("solaris") || target.contains("illumos") {
+ cmsg.define("_XOPEN_SOURCE", "700");
+ }
+ cmsg.compile("cmsg");
}
}
if target.contains("android") || target.contains("linux") {