From 613f8cad90a4359e423f5accbbafeb7dacbd53a5 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 7 Dec 2017 21:14:34 +0000 Subject: [PATCH] runtime: make RawSyscall panic on Solaris It's unused and doesn't work. Fixes #20833 Change-Id: I09335e84c60f88dd1771f7353b0097f36a5e7660 Reviewed-on: https://go-review.googlesource.com/82636 Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- src/runtime/syscall_solaris.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/runtime/syscall_solaris.go b/src/runtime/syscall_solaris.go index 6c9dbe21d3..ee227eaf24 100644 --- a/src/runtime/syscall_solaris.go +++ b/src/runtime/syscall_solaris.go @@ -174,19 +174,9 @@ func syscall_pipe() (r, w, err uintptr) { } // This is syscall.RawSyscall, it exists to satisfy some build dependency, -// but it doesn't work correctly. -// -// DO NOT USE! -// -// TODO(aram): make this panic once we stop calling fcntl(2) in net using it. +// but it doesn't work. func syscall_rawsyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr) { - call := libcall{ - fn: uintptr(unsafe.Pointer(&libc_syscall)), - n: 4, - args: uintptr(unsafe.Pointer(&trap)), - } - asmcgocall(unsafe.Pointer(&asmsysvicall6), unsafe.Pointer(&call)) - return call.r1, call.r2, call.err + panic("RawSyscall not available on Solaris") } //go:nosplit