unix: add Sysconf on solaris

This wraps sysconf(3) on solaris.

Change-Id: Ie5dd32bfa98bf900cadce6f20cefd553fdf80e29
Reviewed-on: https://go-review.googlesource.com/c/sys/+/286593
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Tobias Klauser
2021-02-17 09:05:18 +00:00
committed by Tobias Klauser
parent 1d4d2d3355
commit 21e18009e2
3 changed files with 23 additions and 0 deletions
+8
View File
@@ -74,3 +74,11 @@ func TestStatvfs(t *testing.T) {
}
}
}
func TestSysconf(t *testing.T) {
n, err := unix.Sysconf(3 /* SC_CLK_TCK */)
if err != nil {
t.Fatalf("Sysconf: %v", err)
}
t.Logf("Sysconf(SC_CLK_TCK) = %d", n)
}