x/sys/unix: expose fchmodat(2) and related constants on darwin/amd64

These are already exposed on Linux. I believe they were left out of
darwin because fchmodat didn't exist on older versions of XNU.

Change-Id: I166f2b23270937c1b6cc3bd73e7f7b72d2d488e9
Reviewed-on: https://go-review.googlesource.com/14092
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Aaron Jacobs
2015-09-02 01:16:36 +00:00
committed by Ian Lance Taylor
parent 2ac7e53520
commit e6e5e023fc
4 changed files with 30 additions and 0 deletions
+2
View File
@@ -11,6 +11,8 @@ import (
"unsafe"
)
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }