]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: use libc in Exec on openbsd/arm64
authorTobias Klauser <tklauser@distanz.ch>
Wed, 21 Apr 2021 10:24:27 +0000 (12:24 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Wed, 21 Apr 2021 15:57:05 +0000 (15:57 +0000)
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>
src/syscall/exec_unix.go

index 1f38de22b281c699254db3caabf44a765a6e8768..64a5b61fe5e1d96f9e469748a34e86c8e481df6b 100644 (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 {