summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-10 00:32:44 +0000
committerbors <bors@rust-lang.org>2022-10-10 00:32:44 +0000
commitfe4f6d7bcf0a011299e790723c11b0e305603e9f (patch)
tree980588f5301f40310f441f9c5a3c94a6a650d4fc
parent0f5ee7a8073cbd72d8fbc40679c218d9982d7144 (diff)
parenta36515f3f3255a76c6bebc28faf9709bb15d4323 (diff)
downloadrust-libc-fe4f6d7bcf0a011299e790723c11b0e305603e9f.tar.gz
Auto merge of #2952 - SteveLauC:eaccess-on-freebsd-and-dragonfly, r=JohnTitor
add eaccess on freebsd and dragonfly [man page of freebsd](https://www.freebsd.org/cgi/man.cgi?query=eaccess&sektion=2&n=1) [man page of dragonfly](https://man.dragonflybsd.org/?command=access&section=2)
-rw-r--r--libc-test/semver/dragonfly.txt1
-rw-r--r--libc-test/semver/freebsd.txt1
-rw-r--r--src/unix/bsd/freebsdlike/mod.rs2
3 files changed, 4 insertions, 0 deletions
diff --git a/libc-test/semver/dragonfly.txt b/libc-test/semver/dragonfly.txt
index e56441640b..e27f0f6fda 100644
--- a/libc-test/semver/dragonfly.txt
+++ b/libc-test/semver/dragonfly.txt
@@ -1536,3 +1536,4 @@ vmspace
wait4
waitid
xucred
+eaccess \ No newline at end of file
diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt
index e74355f1e5..649ef77161 100644
--- a/libc-test/semver/freebsd.txt
+++ b/libc-test/semver/freebsd.txt
@@ -1925,3 +1925,4 @@ wait4
waitid
xallocx
xucred
+eaccess \ No newline at end of file
diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs
index 3bf083c5ca..db21597d98 100644
--- a/src/unix/bsd/freebsdlike/mod.rs
+++ b/src/unix/bsd/freebsdlike/mod.rs
@@ -1731,6 +1731,8 @@ extern "C" {
pub fn eui64_ntoa(id: *const eui64, a: *mut ::c_char, len: ::size_t) -> ::c_int;
pub fn eui64_ntohost(hostname: *mut ::c_char, len: ::size_t, id: *const eui64) -> ::c_int;
pub fn eui64_hostton(hostname: *const ::c_char, id: *mut eui64) -> ::c_int;
+
+ pub fn eaccess(path: *const ::c_char, mode: ::c_int) -> ::c_int;
}
#[link(name = "rt")]