mirror of
https://github.com/golang/go.git
synced 2025-05-30 11:51:34 +00:00
internal/syscall/unix: implement Eaccess on netbsd
Like on linux and freebsd, use faccessat(AT_FDCWD, path, mode, AT_EACCESS) Change-Id: Ia76ba67023b6deba6f0cdaf30a0b9cee0c140bb8 Reviewed-on: https://go-review.googlesource.com/c/go/+/531876 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Benny Siegert <bsiegert@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
98289021f3
commit
f79c99fe8a
@ -10,7 +10,11 @@ const unlinkatTrap uintptr = syscall.SYS_UNLINKAT
|
|||||||
const openatTrap uintptr = syscall.SYS_OPENAT
|
const openatTrap uintptr = syscall.SYS_OPENAT
|
||||||
const fstatatTrap uintptr = syscall.SYS_FSTATAT
|
const fstatatTrap uintptr = syscall.SYS_FSTATAT
|
||||||
|
|
||||||
const AT_REMOVEDIR = 0x800
|
const (
|
||||||
const AT_SYMLINK_NOFOLLOW = 0x200
|
AT_EACCESS = 0x100
|
||||||
|
AT_FDCWD = -0x64
|
||||||
|
AT_REMOVEDIR = 0x800
|
||||||
|
AT_SYMLINK_NOFOLLOW = 0x200
|
||||||
|
|
||||||
const UTIME_OMIT = (1 << 30) - 2
|
UTIME_OMIT = (1 << 30) - 2
|
||||||
|
)
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build freebsd || netbsd
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
import (
|
import (
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build unix && !freebsd && !linux
|
//go:build unix && !freebsd && !linux && !netbsd
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user