Skip to content

Commit d252fc6

Browse files
authored
Merge pull request #4348 from psumbera/solaris-tmpfix4nix
temporarily define O_DIRECT and SIGINFO for Solaris
2 parents f5105c6 + 141c6d7 commit d252fc6

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

libc-test/build.rs

+7
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,13 @@ fn test_solarish(target: &str) {
998998
cfg.define("__EXTENSIONS__", None);
999999
cfg.define("_LCONV_C99", None);
10001000

1001+
// FIXME(solaris): This should be removed once new Nix crate is released.
1002+
// See comment in src/unix/solarish/solaris.rs for these.
1003+
if is_solaris {
1004+
cfg.define("O_DIRECT", Some("0x2000000"));
1005+
cfg.define("SIGINFO", Some("41"));
1006+
}
1007+
10011008
headers! {
10021009
cfg:
10031010
"aio.h",

src/unix/solarish/solaris.rs

+8
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,14 @@ cfg_if! {
161161
}
162162
}
163163

164+
// FIXME(solaris): O_DIRECT and SIGINFO are NOT available on Solaris.
165+
// But in past they were defined here and thus other crates expected them.
166+
// Latest version v0.29.0 of Nix crate still expects this. Since last
167+
// version of Nix crate is almost one year ago let's define these two
168+
// temporarily before new Nix version is released.
169+
pub const O_DIRECT: c_int = 0x2000000;
170+
pub const SIGINFO: c_int = 41;
171+
164172
pub const _UTMP_USER_LEN: usize = 32;
165173
pub const _UTMP_LINE_LEN: usize = 32;
166174
pub const _UTMP_ID_LEN: usize = 4;

0 commit comments

Comments
 (0)