From 82aafbf43bf885069dc71b7e7c2f9d7a614d47da Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 21 Nov 2017 21:10:17 +0100 Subject: [PATCH] unix: add SYS___SYSCTL on darwin/arm Add the same workaround as already present for 386 (CL 14151), amd64 (CL 14091) and arm64 (CL 14094) on darwin. Fixes golang/go#22839 Change-Id: I7eee543df204410dd3328dccb7d81166f77e1e2f Reviewed-on: https://go-review.googlesource.com/79155 Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- unix/syscall_darwin_arm.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unix/syscall_darwin_arm.go b/unix/syscall_darwin_arm.go index 47ab6648..faae207a 100644 --- a/unix/syscall_darwin_arm.go +++ b/unix/syscall_darwin_arm.go @@ -60,3 +60,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e } func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic + +// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions +// of darwin/arm the syscall is called sysctl instead of __sysctl. +const SYS___SYSCTL = SYS_SYSCTL