mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-31 14:26:40 -04:00
unix: drop fallback to pipe in Pipe on linux/arm
Same as CL 347349 does for package syscall. The minimum required Linux kernel version for Go 1.18 will be changed to 2.6.32, see golang/go#45964. The pipe2 syscall was added in 2.6.27, so the fallback to use the pipe syscall in syscall.Pipe on linux/arm can be removed. For golang/go#45964 Change-Id: I8e222dc4b373b22f91bc1ddcc48f58a37dafcffa Reviewed-on: https://go-review.googlesource.com/c/sys/+/347331 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
committed by
Tobias Klauser
parent
f475640dd0
commit
0a7ae4be8d
@@ -26,11 +26,7 @@ func Pipe(p []int) (err error) {
|
|||||||
return EINVAL
|
return EINVAL
|
||||||
}
|
}
|
||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
// Try pipe2 first for Android O, then try pipe for kernel 2.6.23.
|
|
||||||
err = pipe2(&pp, 0)
|
err = pipe2(&pp, 0)
|
||||||
if err == ENOSYS {
|
|
||||||
err = pipe(&pp)
|
|
||||||
}
|
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user