summaryrefslogtreecommitdiff
path: root/src/unistd.rs
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2023-04-26 12:13:29 +0100
committerAndrew Walbran <qwandor@google.com>2023-05-22 10:40:29 +0100
commitee2e1deff805692c4a4cc9172b458b8a5edca44f (patch)
treec458819deafce46b0aea6298220dcee2ff7425df /src/unistd.rs
parentc6f9e2332efcf62c751d7a0174bb791e732b90a8 (diff)
downloadnix-ee2e1deff805692c4a4cc9172b458b8a5edca44f.zip
Use .bits() method rather than field for bitflags.
Diffstat (limited to 'src/unistd.rs')
-rw-r--r--src/unistd.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/unistd.rs b/src/unistd.rs
index 7230c337..afa80e9b 100644
--- a/src/unistd.rs
+++ b/src/unistd.rs
@@ -3375,7 +3375,7 @@ feature! {
/// See [access(2)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/access.html)
pub fn access<P: ?Sized + NixPath>(path: &P, amode: AccessFlags) -> Result<()> {
let res = path.with_nix_path(|cstr| unsafe {
- libc::access(cstr.as_ptr(), amode.bits)
+ libc::access(cstr.as_ptr(), amode.bits())
})?;
Errno::result(res).map(drop)
}
@@ -3422,7 +3422,7 @@ pub fn faccessat<P: ?Sized + NixPath>(
))]
pub fn eaccess<P: ?Sized + NixPath>(path: &P, mode: AccessFlags) -> Result<()> {
let res = path.with_nix_path(|cstr| unsafe {
- libc::eaccess(cstr.as_ptr(), mode.bits)
+ libc::eaccess(cstr.as_ptr(), mode.bits())
})?;
Errno::result(res).map(drop)
}