diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2024-04-18 09:39:31 +0200 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2024-04-19 15:02:38 +0000 |
commit | 974b2011ca2a74ca1137558771b428bddb2e7df3 (patch) | |
tree | 9ecdf1125e64e46b9ce416f6340156d2f66873de /src/internal/syscall/unix/at_sysnum_darwin.go | |
parent | 104c293ffe0037de2462cdd404a6910dcf58298d (diff) | |
download | go-974b2011ca2a74ca1137558771b428bddb2e7df3.tar.gz go-974b2011ca2a74ca1137558771b428bddb2e7df3.zip |
internal/syscall/unix: implement Eaccess on darwin
Like on other Unix-like platforms, use faccessat(AT_FDCWD, path, mode,
AT_EACCESS).
Change-Id: I6e04b4244f8e90bd3b35b1b8a9ca38fe845b34ae
Reviewed-on: https://go-review.googlesource.com/c/go/+/579976
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/internal/syscall/unix/at_sysnum_darwin.go')
-rw-r--r-- | src/internal/syscall/unix/at_sysnum_darwin.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/internal/syscall/unix/at_sysnum_darwin.go b/src/internal/syscall/unix/at_sysnum_darwin.go index 208ff34d038..77b0af80b5d 100644 --- a/src/internal/syscall/unix/at_sysnum_darwin.go +++ b/src/internal/syscall/unix/at_sysnum_darwin.go @@ -4,7 +4,11 @@ package unix -const AT_REMOVEDIR = 0x80 -const AT_SYMLINK_NOFOLLOW = 0x0020 +const ( + AT_EACCESS = 0x10 + AT_FDCWD = -0x2 + AT_REMOVEDIR = 0x80 + AT_SYMLINK_NOFOLLOW = 0x0020 -const UTIME_OMIT = -0x2 + UTIME_OMIT = -0x2 +) |