diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2018-03-14 15:35:22 +0000 |
---|---|---|
committer | Aram Hăvărneanu <aram@mgk.ro> | 2018-03-14 16:01:39 +0000 |
commit | f0939ba5b18aea6649bf405dd6571030915afd56 (patch) | |
tree | e0155c3fb94617feaef6f1435bf754da87420712 /src/runtime/syscall_solaris.go | |
parent | cd3aae9b815389a5e2f05066beffdf9678534325 (diff) | |
download | go-f0939ba5b18aea6649bf405dd6571030915afd56.tar.gz go-f0939ba5b18aea6649bf405dd6571030915afd56.zip |
runtime, syscall: add RawSyscall6 on Solaris and make it panic
The syscall package currently declares RawSyscall6 for every GOOS, but
does not define it on Solaris. This leads to code using said function
to compile but it will not link. Fix it by adding RawSyscall6 and make
it panic.
Also remove the obsolete comment above runtime.syscall_syscall as
pointed out by Aram.
Updates #24357
Change-Id: I1b1423121d1c99de2ecc61cd9a935dba9b39e3a4
Reviewed-on: https://go-review.googlesource.com/100655
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Diffstat (limited to 'src/runtime/syscall_solaris.go')
-rw-r--r-- | src/runtime/syscall_solaris.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/runtime/syscall_solaris.go b/src/runtime/syscall_solaris.go index ec83bd845b..12afca17bb 100644 --- a/src/runtime/syscall_solaris.go +++ b/src/runtime/syscall_solaris.go @@ -180,6 +180,12 @@ func syscall_rawsyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr) { panic("RawSyscall not available on Solaris") } +// This is syscall.RawSyscall6, it exists to avoid a linker error because +// syscall.RawSyscall6 is already declared. See golang.org/issue/24357 +func syscall_rawsyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) { + panic("RawSyscall6 not available on Solaris") +} + //go:nosplit func syscall_setgid(gid uintptr) (err uintptr) { call := libcall{ @@ -235,12 +241,6 @@ func syscall_setpgid(pid, pgid uintptr) (err uintptr) { return call.err } -// This is syscall.Syscall, 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. func syscall_syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr) { call := libcall{ fn: uintptr(unsafe.Pointer(&libc_syscall)), |