diff options
author | bgermann <bgermann@users.noreply.github.com> | 2017-11-18 22:03:14 +0100 |
---|---|---|
committer | bgermann <bgermann@users.noreply.github.com> | 2017-11-18 22:03:14 +0100 |
commit | 85680dc23ecd02e060fd8112af410451e3a38e8f (patch) | |
tree | 81ba79240a2c458d824c27b3b7e4cb91f30d0042 /libc-test | |
parent | 13624c8e83b5d0340bb9367c05e0d2c38a8f635b (diff) | |
download | rust-libc-85680dc23ecd02e060fd8112af410451e3a38e8f.tar.gz |
Add some Solaris quirks
Diffstat (limited to 'libc-test')
-rw-r--r-- | libc-test/build.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index 62d181a24c..edf94d715e 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -36,7 +36,9 @@ fn main() { } else if windows { cfg.define("_WIN32_WINNT", Some("0x8000")); } else if solaris { - cfg.define("_REENTRANT", None); + cfg.define("_XOPEN_SOURCE", Some("700")); + cfg.define("__EXTENSIONS__", None); + cfg.define("_LCONV_C99", None); } // Android doesn't actually have in_port_t but it's much easier if we @@ -567,7 +569,7 @@ fn main() { "getdtablesize" if android => true, "dlerror" if android => true, // const-ness is added - "dladdr" if musl => true, // const-ness only added recently + "dladdr" if musl || solaris => true, // const-ness only added recently // OSX has 'struct tm *const' which we can't actually represent in // Rust, but is close enough to *mut @@ -653,7 +655,7 @@ fn main() { // We can wait for the next major release to be compliant with the new API. // FIXME: unskip these for next major release "strerror_r" | "madvise" | "msync" | "mprotect" | "recvfrom" | "getpriority" | - "setpriority" | "personality" if android => true, + "setpriority" | "personality" if android || solaris => true, // In Android 64 bits, these functions have been fixed since unified headers. // Ignore these until next major version. "bind" | "writev" | "readv" | "sendmsg" | "recvmsg" if android && (aarch64 || x86_64) => true, @@ -663,6 +665,9 @@ fn main() { "cfmakeraw" | "cfsetspeed" if solaris => true, + // FIXME: mincore is defined with caddr_t on Solaris. + "mincore" if solaris => true, + _ => false, } }); |