1
0
mirror of https://github.com/golang/go synced 2024-11-26 05:07:59 -07:00

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 <tobias.klauser@gmail.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
This commit is contained in:
Tobias Klauser 2021-04-21 12:24:27 +02:00 committed by Tobias Klauser
parent e5bc4f2a77
commit f9e2dbbfc9

View File

@ -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 {