From 553c52553430129e18e61fa207ac88f22269d4f3 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} | 3 +++ activation/files_unix.go | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) rename activation/{files_windows.go => files_stub.go} (92%) diff --git a/activation/files_windows.go b/activation/files_stub.go similarity index 92% rename from activation/files_windows.go rename to activation/files_stub.go index d391bf00..31db300c 100644 --- a/activation/files_windows.go +++ b/activation/files_stub.go @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build windows || plan9 +// +build windows plan9 + package activation import "os" diff --git a/activation/files_unix.go b/activation/files_unix.go index bf7671dd..549f1614 100644 --- a/activation/files_unix.go +++ b/activation/files_unix.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build !windows -// +build !windows +//go:build !windows && !plan9 +// +build !windows,!plan9 // Package activation implements primitives for systemd socket activation. package activation