summaryrefslogtreecommitdiff
path: root/internal/syscallcompat/emulate.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/syscallcompat/emulate.go')
-rw-r--r--internal/syscallcompat/emulate.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/internal/syscallcompat/emulate.go b/internal/syscallcompat/emulate.go
index c0a0d09..35e17c6 100644
--- a/internal/syscallcompat/emulate.go
+++ b/internal/syscallcompat/emulate.go
@@ -11,26 +11,6 @@ import (
var chdirMutex sync.Mutex
-// emulateOpenat emulates the syscall for platforms that don't have it
-// in the kernel (darwin).
-func emulateOpenat(dirfd int, path string, flags int, mode uint32) (int, error) {
- if !filepath.IsAbs(path) {
- chdirMutex.Lock()
- defer chdirMutex.Unlock()
- cwd, err := syscall.Open(".", syscall.O_RDONLY, 0)
- if err != nil {
- return -1, err
- }
- defer syscall.Close(cwd)
- err = syscall.Fchdir(dirfd)
- if err != nil {
- return -1, err
- }
- defer syscall.Fchdir(cwd)
- }
- return syscall.Open(path, flags, mode)
-}
-
// emulateRenameat emulates the syscall for platforms that don't have it
// in the kernel (darwin).
func emulateRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) error {