From 61f1d858273d25e06c2287c190ba9b6f5299a76d Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 3 May 2024 19:04:18 +0300 Subject: [PATCH] activation: stub out for plan9 plan9 doesn't have syscall.CloseOnExec, causing anything using `activation` to fail when building on plan9: ``` 2024/05/03 12:12:51 Failed to run [go build --ldflags -s -X github.com/rclone/rclone/fs.Version=v1.67.0-beta.7911.f8ce568ca.merge -trimpath -o rclone-v1.67.0-beta.7911.f8ce568ca.merge-plan9-386/rclone -tags ..]: exit status 1 2024/05/03 12:12:51 Command output was: Error: ../../../../go/pkg/mod/github.com/coreos/go-systemd/v22@v22.5.0/activation/files_unix.go:60:11: undefined: syscall.CloseOnExec ``` --- activation/{files_windows.go => files_stub.go} | 2 ++ activation/files_unix.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) rename activation/{files_windows.go => files_stub.go} (97%) diff --git a/activation/files_windows.go b/activation/files_stub.go similarity index 97% rename from activation/files_windows.go rename to activation/files_stub.go index d391bf00..5ea78db4 100644 --- a/activation/files_windows.go +++ b/activation/files_stub.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !unix + package activation import "os" diff --git a/activation/files_unix.go b/activation/files_unix.go index 7031f281..e88d50ef 100644 --- a/activation/files_unix.go +++ b/activation/files_unix.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build !windows +//go:build unix // Package activation implements primitives for systemd socket activation. package activation