diff options
author | Russ Cox <rsc@golang.org> | 2009-06-29 13:44:46 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-06-29 13:44:46 -0700 |
commit | d24c34a8af0beb14107287f080cf2725972e229b (patch) | |
tree | e6bbb102e254a3b8402070f0546a3886af0daa03 /src/pkg/syscall/zsyscall_darwin_amd64.go | |
parent | d56d30d5ce1512232e4428faec7f43b013e97c30 (diff) | |
download | golang-d24c34a8af0beb14107287f080cf2725972e229b.tar.gz |
add os.Hostname
R=r
DELTA=188 (182 added, 3 deleted, 3 changed)
OCL=30856
CL=30860
Diffstat (limited to 'src/pkg/syscall/zsyscall_darwin_amd64.go')
-rw-r--r-- | src/pkg/syscall/zsyscall_darwin_amd64.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pkg/syscall/zsyscall_darwin_amd64.go b/src/pkg/syscall/zsyscall_darwin_amd64.go index 49e17d43b..7afb20953 100644 --- a/src/pkg/syscall/zsyscall_darwin_amd64.go +++ b/src/pkg/syscall/zsyscall_darwin_amd64.go @@ -87,6 +87,14 @@ func kevent(kq int, change uintptr, nchange int, event uintptr, nevent int, time return; } +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (errno int) { + var _p0 *_C_int; + if len(mib) > 0 { _p0 = &mib[0]; } + r0, r1, e1 := Syscall6(SYS___SYSCTL, uintptr(unsafe.Pointer(_p0)), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)); + errno = int(e1); + return; +} + func fcntl(fd int, cmd int, arg int) (val int, errno int) { r0, r1, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)); val = int(r0); |