aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2019-12-24 01:24:43 +0100
committerTobias Klauser <tobias.klauser@gmail.com>2019-12-26 13:53:31 +0000
commit075c20cea8a1efda0e8d5d33a1995a220ad27b8c (patch)
treed5a7e7d4dd3821ac02f50e7cb0b0c428525dd24f /src
parentc170b14c2c1cfb2fd853a37add92a82fd6eb4318 (diff)
downloadgo-075c20cea8a1efda0e8d5d33a1995a220ad27b8c.tar.xz
internal/poll: use fcntl64 on 32-bit GNU/Linux systems
Use FcntlSyscall from internal/syscall/unix to get fcntl64 on 32-bit Linux systems. Updates #36211 Change-Id: If48a6e09606ca9f7f6e22f3e8dc9a25fb3ccaf65 Reviewed-on: https://go-review.googlesource.com/c/go/+/212537 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/go/build/deps_test.go2
-rw-r--r--src/internal/poll/splice_linux.go3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go
index fd256ee000..a64c2b3241 100644
--- a/src/go/build/deps_test.go
+++ b/src/go/build/deps_test.go
@@ -168,7 +168,7 @@ var pkgDeps = map[string][]string{
},
"internal/cfg": {"L0"},
- "internal/poll": {"L0", "internal/oserror", "internal/race", "syscall", "time", "unicode/utf16", "unicode/utf8", "internal/syscall/windows"},
+ "internal/poll": {"L0", "internal/oserror", "internal/race", "syscall", "time", "unicode/utf16", "unicode/utf8", "internal/syscall/windows", "internal/syscall/unix"},
"internal/testlog": {"L0"},
"os": {"L1", "os", "syscall", "time", "internal/oserror", "internal/poll", "internal/syscall/windows", "internal/syscall/unix", "internal/testlog"},
"path/filepath": {"L2", "os", "syscall", "internal/syscall/windows"},
diff --git a/src/internal/poll/splice_linux.go b/src/internal/poll/splice_linux.go
index 4f97298417..5b17ae8551 100644
--- a/src/internal/poll/splice_linux.go
+++ b/src/internal/poll/splice_linux.go
@@ -5,6 +5,7 @@
package poll
import (
+ "internal/syscall/unix"
"sync/atomic"
"syscall"
"unsafe"
@@ -169,7 +170,7 @@ func newTempPipe() (prfd, pwfd int, sc string, err error) {
defer atomic.StorePointer(&disableSplice, unsafe.Pointer(p))
// F_GETPIPE_SZ was added in 2.6.35, which does not have the -EAGAIN bug.
- if _, _, errno := syscall.Syscall(syscall.SYS_FCNTL, uintptr(fds[0]), syscall.F_GETPIPE_SZ, 0); errno != 0 {
+ if _, _, errno := syscall.Syscall(unix.FcntlSyscall, uintptr(fds[0]), syscall.F_GETPIPE_SZ, 0); errno != 0 {
*p = true
destroyTempPipe(fds[0], fds[1])
return -1, -1, "fcntl", errno