aboutsummaryrefslogtreecommitdiff
path: root/internal/syscallcompat/emulate.go
diff options
context:
space:
mode:
authorSebastian Lackner2019-01-14 02:56:06 +0100
committerrfjakob2019-01-14 21:27:28 +0100
commit4134ff7570906d38d519b1aad33cd3e97685e92f (patch)
treeeed4c67476b1b39f5aff5af81d575a8df1f70688 /internal/syscallcompat/emulate.go
parent7b0d56fe98a4ae449d26af0b83d00271a179db6e (diff)
syscallcompat: Drop Mkdirat 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 a98a0ce..7bed31a 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)
}
-// 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) {
- if !filepath.IsAbs(path) {
- 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(dirfd)
- if err != nil {
- return err
- }
- defer syscall.Fchdir(cwd)
- }
- return syscall.Mkdir(path, mode)
-}
-
// emulateFstatat emulates the syscall for platforms that don't have it
// in the kernel (darwin).
func emulateFstatat(dirfd int, path string, stat *unix.Stat_t, flags int) (err error) {