mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
syscall: exec_linux.go: support platforms without SYS_DUP2
Updates #9974 This change is in preparation for merging the arm64 platform. Arm64 does not support SYS_DUP2 at all, so define a new constant to be the minimum dup(2) version supported. This constant defaults to SYS_DUP2 on all existing platforms. Change-Id: If405878105082c7c880f8541c1491970124c9ce4 Reviewed-on: https://go-review.googlesource.com/7123 Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
This commit is contained in:
parent
f00c19add5
commit
532bc5f11c
5 changed files with 11 additions and 3 deletions
|
|
@ -6,6 +6,8 @@ package syscall
|
|||
|
||||
import "unsafe"
|
||||
|
||||
const _SYS_dup = SYS_DUP2
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue