From f9e2dbbfc92fdc19c4e9412b318beb5294d91bff Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 21 Apr 2021 12:24:27 +0200 Subject: [PATCH] syscall: use libc in Exec on openbsd/arm64 Like on openbsd/amd64, use libc instead of direct syscalls on openbsd/arm64. This was likely missed in CL 286815. A similar change was done for openbsd/amd64 in CL 270380. Updates #36435 Change-Id: Ie496a6130f1a43d30974502777db12217e65c551 Reviewed-on: https://go-review.googlesource.com/c/go/+/312229 Trust: Tobias Klauser Reviewed-by: Cherry Zhang Reviewed-by: Joel Sing --- src/syscall/exec_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/syscall/exec_unix.go b/src/syscall/exec_unix.go index 1f38de22b28..64a5b61fe5e 100644 --- a/src/syscall/exec_unix.go +++ b/src/syscall/exec_unix.go @@ -301,7 +301,7 @@ func Exec(argv0 string, argv []string, envv []string) (err error) { } else if runtime.GOOS == "darwin" || runtime.GOOS == "ios" { // Similarly on Darwin. err1 = execveDarwin(argv0p, &argvp[0], &envvp[0]) - } else if runtime.GOOS == "openbsd" && runtime.GOARCH == "amd64" { + } else if runtime.GOOS == "openbsd" && (runtime.GOARCH == "amd64" || runtime.GOARCH == "arm64") { // Similarly on OpenBSD. err1 = execveOpenBSD(argv0p, &argvp[0], &envvp[0]) } else {