diff --git a/libc-test/build.rs b/libc-test/build.rs index 50e4e44346e8a..252d5206f3896 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -998,6 +998,13 @@ fn test_solarish(target: &str) { cfg.define("__EXTENSIONS__", None); cfg.define("_LCONV_C99", None); + // FIXME(solaris): This should be removed once new Nix crate is released. + // See comment in src/unix/solarish/solaris.rs for these. + if is_solaris { + cfg.define("O_DIRECT", Some("0x2000000")); + cfg.define("SIGINFO", Some("41")); + } + headers! { cfg: "aio.h", diff --git a/src/unix/solarish/solaris.rs b/src/unix/solarish/solaris.rs index 3e57abcfa21c9..0eca2c4f6f8cc 100644 --- a/src/unix/solarish/solaris.rs +++ b/src/unix/solarish/solaris.rs @@ -161,6 +161,14 @@ cfg_if! { } } +// FIXME(solaris): O_DIRECT and SIGINFO are NOT available on Solaris. +// But in past they were defined here and thus other crates expected them. +// Latest version v0.29.0 of Nix crate still expects this. Since last +// version of Nix crate is almost one year ago let's define these two +// temporarily before new Nix version is released. +pub const O_DIRECT: c_int = 0x2000000; +pub const SIGINFO: c_int = 41; + pub const _UTMP_USER_LEN: usize = 32; pub const _UTMP_LINE_LEN: usize = 32; pub const _UTMP_ID_LEN: usize = 4;