unix: fix Getpagesize to return actual system value on Solaris

In preparation for issues such as #10180, Getpagesize() needs to be
fixed to return the actual system's page size instead of assuming it's
always 4096.

This is particularly important for future platform support on Solaris.

Fixes #12076

Change-Id: I78205165909529215fe93ed6ba56e9c3ee1c2abb
Reviewed-on: https://go-review.googlesource.com/14483
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Shawn Walker-Salas
2015-09-10 21:42:51 +00:00
committed by Brad Fitzpatrick
parent 16e60ce682
commit 131454b560
5 changed files with 35 additions and 3 deletions
-2
View File
@@ -6,8 +6,6 @@
package unix
func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
func NsecToTimespec(nsec int64) (ts Timespec) {