diff options
author | Jakob Unterwurzacher | 2022-01-22 12:40:54 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2022-01-22 12:44:04 +0100 |
commit | b859bc96efa91eff01f7dc0c14d90633b7e4ba92 (patch) | |
tree | 7b463fa14af7692e69d24b8054c039690ce56d22 | |
parent | 3bac814ea9f8468499c65c9b2b0a6f023e23d35e (diff) |
fusefrontend: fix "duplicate case" darwin build failure
$ ./crossbuild.bash
[...]
+ GOOS=darwin
+ GOARCH=amd64
+ build
+ go build -tags without_openssl -o /dev/null
internal/fusefrontend/node.go:397:2: duplicate case syscallcompat.RENAME_NOREPLACE (value 0) in switch
previous case at internal/fusefrontend/node.go:397:7
internal/fusefrontend/node.go:397:2: duplicate case syscallcompat.RENAME_EXCHANGE (value 0) in switch
previous case at internal/fusefrontend/node.go:397:7
internal/fusefrontend/node.go:397:2: duplicate case syscallcompat.RENAME_WHITEOUT (value 0) in switch
previous case at internal/fusefrontend/node.go:397:7
internal/fusefrontend/node.go:399:38: duplicate case syscallcompat.RENAME_NOREPLACE | syscallcompat.RENAME_WHITEOUT (value 0) in switch
previous case at internal/fusefrontend/node.go:397:7
-rw-r--r-- | internal/syscallcompat/sys_darwin.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/syscallcompat/sys_darwin.go b/internal/syscallcompat/sys_darwin.go index 7b8773c..06f09f0 100644 --- a/internal/syscallcompat/sys_darwin.go +++ b/internal/syscallcompat/sys_darwin.go @@ -21,10 +21,11 @@ const ( // O_PATH is only defined on Linux O_PATH = 0 - // Only defined on Linux - RENAME_NOREPLACE = 0 - RENAME_WHITEOUT = 0 - RENAME_EXCHANGE = 0 + // Only exists on Linux. Define here to fix build failure, even though + // we will never see the flags. + RENAME_NOREPLACE = 1 + RENAME_EXCHANGE = 2 + RENAME_WHITEOUT = 4 // KAUTH_UID_NONE and KAUTH_GID_NONE are special values to // revert permissions to the process credentials. |