Skip to content

temporarily define O_DIRECT and SIGINFO for Solaris #4348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions src/unix/solarish/solaris.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading