aboutsummaryrefslogtreecommitdiff
path: root/internal/syscallcompat/emulate.go
diff options
context:
space:
mode:
authorSebastian Lackner2019-01-14 02:51:50 +0100
committerrfjakob2019-01-14 21:27:28 +0100
commit7b0d56fe98a4ae449d26af0b83d00271a179db6e (patch)
tree64c4d65ac92ba86949ad3376e47a1292953044ae /internal/syscallcompat/emulate.go
parent92110628ee5f48b0106b32090854fcc61d6bca20 (diff)
syscallcompat: Drop Symlinkat emulation on macOS.
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 dc8cf6d..a98a0ce 100644
--- a/internal/syscallcompat/emulate.go
+++ b/internal/syscallcompat/emulate.go
@@ -30,26 +30,6 @@ func emulateMknodat(dirfd int, path string, mode uint32, dev int) error {
return syscall.Mknod(path, mode, dev)
}
-// emulateSymlinkat emulates the syscall for platforms that don't have it
-// in the kernel (darwin).
-func emulateSymlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- if !filepath.IsAbs(newpath) {
- chdirMutex.Lock()
- defer chdirMutex.Unlock()
- cwd, err := syscall.Open(".", syscall.O_RDONLY, 0)
- if err != nil {
- return err
- }
- defer syscall.Close(cwd)
- err = syscall.Fchdir(newdirfd)
- if err != nil {
- return err
- }
- defer syscall.Fchdir(cwd)
- }
- return syscall.Symlink(oldpath, newpath)
-}
-
// emulateMkdirat emulates the syscall for platforms that don't have it
// in the kernel (darwin).
func emulateMkdirat(dirfd int, path string, mode uint32) (err error) {