unix: fix redefinition of seek func on arm and gccgo Change-Id: Ia23cb723766e9d76d51c24ace0157f47cb5b34ae Reviewed-on: https://go-review.googlesource.com/c/sys/+/249617 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
diff --git a/unix/syscall_linux_arm.go b/unix/syscall_linux_arm.go index e1913e2..496837b 100644 --- a/unix/syscall_linux_arm.go +++ b/unix/syscall_linux_arm.go
@@ -7,7 +7,6 @@ package unix import ( - "syscall" "unsafe" ) @@ -49,10 +48,6 @@ return } -// 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 Seek(fd int, offset int64, whence int) (newoffset int64, err error) { newoffset, errno := seek(fd, offset, whence) if errno != 0 {
diff --git a/unix/syscall_linux_gc_arm.go b/unix/syscall_linux_gc_arm.go new file mode 100644 index 0000000..8c514c9 --- /dev/null +++ b/unix/syscall_linux_gc_arm.go
@@ -0,0 +1,13 @@ +// Copyright 2009 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 arm,!gccgo,linux + +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)