diff options
Diffstat (limited to 'user/gitlab-runner/fix-multiple-redef-seek.patch')
-rw-r--r-- | user/gitlab-runner/fix-multiple-redef-seek.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/user/gitlab-runner/fix-multiple-redef-seek.patch b/user/gitlab-runner/fix-multiple-redef-seek.patch new file mode 100644 index 000000000..5a9d1ef10 --- /dev/null +++ b/user/gitlab-runner/fix-multiple-redef-seek.patch @@ -0,0 +1,38 @@ +diff -ur a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go +--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go 2023-01-04 02:17:18.689781320 +0000 ++++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go 2023-01-04 02:19:46.688219811 +0000 +@@ -45,7 +45,13 @@ + + // 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) (int64, syscall.Errno) { ++ var newoffset int64 ++ offsetLow := uint32(offset & 0xffffffff) ++ offsetHigh := uint32((offset >> 32) & 0xffffffff) ++ _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) ++ return newoffset, err ++} + + func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + newoffset, errno := seek(fd, offset, whence) +diff -ur a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go +--- a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go 2023-01-04 02:17:18.689781320 +0000 ++++ b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go 2023-01-04 02:20:04.283558738 +0000 +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-// +build linux,gccgo,arm ++// +build linux,!gccgo,arm + + package unix + +@@ -11,6 +11,7 @@ + "unsafe" + ) + ++// this file should not be built + func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { + var newoffset int64 + offsetLow := uint32(offset & 0xffffffff) |