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

add faccessat on illumos #1841

Merged
merged 1 commit into from Oct 10, 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -22,6 +22,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
([#1831](https://github.com/nix-rust/nix/pull/1831))
- Added `syncfs(2)` on Linux
([#1833](https://github.com/nix-rust/nix/pull/1833))
- Added `faccessat(2)` on illumos
([#1841](https://github.com/nix-rust/nix/pull/1841))

### Changed

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -27,7 +27,7 @@ targets = [
]

[dependencies]
libc = { version = "0.2.134", features = [ "extra_traits" ] }
libc = { version = "0.2.135", features = [ "extra_traits" ] }
bitflags = "1.1"
cfg-if = "1.0"
pin-utils = { version = "0.1.0", optional = true }
Expand Down
3 changes: 1 addition & 2 deletions src/unistd.rs
Expand Up @@ -2921,9 +2921,8 @@ pub fn access<P: ?Sized + NixPath>(path: &P, amode: AccessFlags) -> Result<()> {
/// # References
///
/// [faccessat(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/faccessat.html)
// illumos: faccessat(2) appears to be supported, but the libc crate does not provide a binding.
// redox: does not appear to support the *at family of syscalls.
#[cfg(not(any(target_os = "illumos", target_os = "redox")))]
#[cfg(not(target_os = "redox"))]
pub fn faccessat<P: ?Sized + NixPath>(dirfd: Option<RawFd>, path: &P, mode: AccessFlags, flags: AtFlags) -> Result<()> {
let res = path.with_nix_path(|cstr| {
unsafe {
Expand Down