unix: support compiling with gccgo on linux/386
Implement socketcall and rawsocketcall in addition to seek (already
introduced in CL 100076) to support compiling with gccgo on linux/386
Change-Id: Iaa51aa159a4743ae0e394f541ff196e2d28aa27f
Reviewed-on: https://go-review.googlesource.com/117697
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/unix/syscall_linux_gc_386.go b/unix/syscall_linux_gc_386.go
new file mode 100644
index 0000000..070bd38
--- /dev/null
+++ b/unix/syscall_linux_gc_386.go
@@ -0,0 +1,16 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build linux,!gccgo,386
+
+package unix
+
+import "syscall"
+
+// Underlying system call writes to newoffset via pointer.
+// Implemented in assembly to avoid allocation.
+func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
+
+func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
+func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)