mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
unix: use dup3 in Dup2 on all Linux platforms
The minimum required Linux kernel version for Go 1.18 will be changed to 2.6.32, see golang/go#45964. The dup3 syscall was added in 2.6.27, so it can be used instead of the dup2 syscall which is not implemented on arm64 and riscv64 or blocked on android. For golang/go#45964 Change-Id: I9c677db4bae3ce441b258c49580fb9a2cd600436 Reviewed-on: https://go-review.googlesource.com/c/sys/+/350552 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> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
d61c044b16
commit
437939a702
@@ -46,7 +46,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||
|
||||
// 64-bit file system and 32-bit uid calls
|
||||
// (16-bit uid calls are not always supported in newer kernels)
|
||||
//sys dup2(oldfd int, newfd int) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
|
||||
Reference in New Issue
Block a user