Skip to content

Commit b2318f9

Browse files
Merge #1995
1995: Add `AT_EACCESS` to `AtFlags` on all platforms r=asomers a=MatteoNardi On Linux, I need the `AT_EACCESS` flag for `faccessat`: ``` AT_EACCESS Perform access checks using the effective user and group IDs. By default, faccessat() uses the real IDs (like access()). ``` ~~This commit is enabling it for all platforms but redox. I'm not really sure if this is correct of I should have just added a target_os = "linux". A did quick git grep -e AT_EACCESS -e 'AT_REMOVEDIR' on libc and it showed they're available on the same targets, so for consistence I just removed the cfg limitation.~~ CI was helpful and showed me I was wrong: it's undefined on android. Co-authored-by: Matteo Nardi <[email protected]>
2 parents 2a40128 + e458f5f commit b2318f9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
55

66
## [Unreleased] - ReleaseDate
77
### Added
8+
- Added `AT_EACCESS` to `AtFlags` on all platforms but android
9+
([#1995](https://github.com/nix-rust/nix/pull/1995))
810
- Add `PF_ROUTE` to `SockType` on macOS, iOS, all of the BSDs, Fuchsia, Haiku, Illumos.
911
([#1867](https://github.com/nix-rust/nix/pull/1867))
1012
- Added `nix::ucontext` module on `aarch64-unknown-linux-gnu`.

src/fcntl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ libc_bitflags! {
3535
AT_NO_AUTOMOUNT;
3636
#[cfg(any(target_os = "android", target_os = "linux"))]
3737
AT_EMPTY_PATH;
38-
#[cfg(any(target_os = "illumos", target_os = "solaris"))]
38+
#[cfg(not(target_os = "android"))]
3939
AT_EACCESS;
4040
}
4141
}

0 commit comments

Comments
 (0)