unix: add Uname on Darwin
Darwin doesn't have a uname syscall but the same information can be retrieved using sysctls. Use the raw sysctl numbers instead of doing the roundtrip via SysctlString in order to void the additional sysctl calls in nametomib and SysctlRaw. This implementation follows the one in https://opensource.apple.com/source/Libc/Libc-1244.1.7/gen/uname.c Change-Id: I19541e2a6700f84ced0549a8fb86faa8cb5e6fbe Reviewed-on: https://go-review.googlesource.com/77270 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Showing
Please
register
or
sign in
to comment