Skip to content

Commit

Permalink
Merge #1841
Browse files Browse the repository at this point in the history
1841: add faccessat on illumos r=asomers a=SteveLauC

This binding has been added in [libc#2953](rust-lang/libc#2953)

Co-authored-by: Steve Lau <stevelauc@outlook.com>
  • Loading branch information
bors[bot] and SteveLauC committed Oct 10, 2022
2 parents 7fa8edc + d19f1d3 commit b06b216
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
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

0 comments on commit b06b216

Please sign in to comment.