Skip to content
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

fcntl F_DUPFD_CLOEXEC has different values on Solaris and Illumos #2900

Merged
merged 1 commit into from Sep 11, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/unix/solarish/illumos.rs
Expand Up @@ -42,6 +42,9 @@ pub const F_OFD_SETLKW: ::c_int = 49;
pub const F_FLOCK: ::c_int = 53;
pub const F_FLOCKW: ::c_int = 54;

pub const F_DUPFD_CLOEXEC: ::c_int = 37;
pub const F_DUP2FD_CLOEXEC: ::c_int = 36;

pub const FIL_ATTACH: ::c_int = 0x1;
pub const FIL_DETACH: ::c_int = 0x2;
pub const FIL_LIST: ::c_int = 0x3;
Expand Down
2 changes: 0 additions & 2 deletions src/unix/solarish/mod.rs
Expand Up @@ -1327,7 +1327,6 @@ pub const F_LOCK: ::c_int = 1;
pub const F_TEST: ::c_int = 3;
pub const F_TLOCK: ::c_int = 2;
pub const F_ULOCK: ::c_int = 0;
pub const F_DUPFD_CLOEXEC: ::c_int = 37;
pub const F_SETLK: ::c_int = 6;
pub const F_SETLKW: ::c_int = 7;
pub const F_GETLK: ::c_int = 14;
Expand Down Expand Up @@ -1601,7 +1600,6 @@ pub const NI_NUMERICSCOPE: ::c_uint = 0x0040;

pub const F_DUPFD: ::c_int = 0;
pub const F_DUP2FD: ::c_int = 9;
pub const F_DUP2FD_CLOEXEC: ::c_int = 36;
pub const F_GETFD: ::c_int = 1;
pub const F_SETFD: ::c_int = 2;
pub const F_GETFL: ::c_int = 3;
Expand Down
5 changes: 5 additions & 0 deletions src/unix/solarish/solaris.rs
Expand Up @@ -36,6 +36,11 @@ pub const TCP_KEEPIDLE: ::c_int = 0x1d;
pub const TCP_KEEPCNT: ::c_int = 0x1e;
pub const TCP_KEEPINTVL: ::c_int = 0x1f;

pub const F_DUPFD_CLOEXEC: ::c_int = 47;
pub const F_DUPFD_CLOFORK: ::c_int = 49;
pub const F_DUP2FD_CLOEXEC: ::c_int = 48;
pub const F_DUP2FD_CLOFORK: ::c_int = 50;

extern "C" {
pub fn fexecve(
fd: ::c_int,
Expand Down