summaryrefslogtreecommitdiff
path: root/internal/syscallcompat/sys_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/syscallcompat/sys_linux.go')
-rw-r--r--internal/syscallcompat/sys_linux.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/syscallcompat/sys_linux.go b/internal/syscallcompat/sys_linux.go
index 42e9da6..6273504 100644
--- a/internal/syscallcompat/sys_linux.go
+++ b/internal/syscallcompat/sys_linux.go
@@ -27,6 +27,9 @@ const (
// O_PATH is only defined on Linux
O_PATH = unix.O_PATH
+
+ // RENAME_NOREPLACE is only defined on Linux
+ RENAME_NOREPLACE = unix.RENAME_NOREPLACE
)
var preallocWarn sync.Once
@@ -271,3 +274,8 @@ func UtimesNanoAtNofollow(dirfd int, path string, a *time.Time, m *time.Time) (e
func Getdents(fd int) ([]fuse.DirEntry, error) {
return getdents(fd)
}
+
+// Renameat2 does not exist on Darwin, so we have to wrap it here.
+func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
+ return unix.Renameat2(olddirfd, oldpath, newdirfd, newpath, flags)
+}