Skip to content

Commit 075c20c

Browse files
committed
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent c170b14 commit 075c20c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/go/build/deps_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ var pkgDeps = map[string][]string{
168168
},
169169

170170
"internal/cfg": {"L0"},
171-
"internal/poll": {"L0", "internal/oserror", "internal/race", "syscall", "time", "unicode/utf16", "unicode/utf8", "internal/syscall/windows"},
171+
"internal/poll": {"L0", "internal/oserror", "internal/race", "syscall", "time", "unicode/utf16", "unicode/utf8", "internal/syscall/windows", "internal/syscall/unix"},
172172
"internal/testlog": {"L0"},
173173
"os": {"L1", "os", "syscall", "time", "internal/oserror", "internal/poll", "internal/syscall/windows", "internal/syscall/unix", "internal/testlog"},
174174
"path/filepath": {"L2", "os", "syscall", "internal/syscall/windows"},

src/internal/poll/splice_linux.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package poll
66

77
import (
8+
"internal/syscall/unix"
89
"sync/atomic"
910
"syscall"
1011
"unsafe"
@@ -169,7 +170,7 @@ func newTempPipe() (prfd, pwfd int, sc string, err error) {
169170
defer atomic.StorePointer(&disableSplice, unsafe.Pointer(p))
170171

171172
// F_GETPIPE_SZ was added in 2.6.35, which does not have the -EAGAIN bug.
172-
if _, _, errno := syscall.Syscall(syscall.SYS_FCNTL, uintptr(fds[0]), syscall.F_GETPIPE_SZ, 0); errno != 0 {
173+
if _, _, errno := syscall.Syscall(unix.FcntlSyscall, uintptr(fds[0]), syscall.F_GETPIPE_SZ, 0); errno != 0 {
173174
*p = true
174175
destroyTempPipe(fds[0], fds[1])
175176
return -1, -1, "fcntl", errno

0 commit comments

Comments
 (0)