$OpenBSD: patch-src_syscall_exec_libc2_go,v 1.3 2021/08/27 18:33:27 jsing Exp $

Index: src/syscall/exec_libc2.go
--- src/syscall/exec_libc2.go.orig
+++ src/syscall/exec_libc2.go
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build darwin || (openbsd && !mips64)
-// +build darwin openbsd,!mips64
+//go:build darwin || openbsd
+// +build darwin openbsd
 
 package syscall
 
@@ -117,14 +117,15 @@ func forkAndExecInChild(argv0 *byte, argv, envv []*byt
 	}
 
 	if sys.Foreground {
-		pgrp := sys.Pgid
+		// This should really be pid_t, however _C_int (aka int32) is
+		// generally equivalent.
+		pgrp := _C_int(sys.Pgid)
 		if pgrp == 0 {
 			r1, _, err1 = rawSyscall(abi.FuncPCABI0(libc_getpid_trampoline), 0, 0, 0)
 			if err1 != 0 {
 				goto childerror
 			}
-
-			pgrp = int(r1)
+			pgrp = _C_int(r1)
 		}
 
 		// Place process group in foreground.
