]> Cypherpunks repositories - gostls13.git/commit
syscall: hostname/domainname fix for openbsd
authorJoel Sing <jsing@google.com>
Thu, 17 Nov 2011 14:52:39 +0000 (01:52 +1100)
committerJoel Sing <jsing@google.com>
Thu, 17 Nov 2011 14:52:39 +0000 (01:52 +1100)
commit9b571a31200ffccad327cefb48944a3b88494bcd
tree281a0c4a0fd57a1ad8f57ba62cf69ee56f0789e6
parent773a921ccbb26324db1161edceb38507ab0c96b6
syscall: hostname/domainname fix for openbsd

Work around a bug that was fixed after OpenBSD 5.0 - a request for
kern.hostname or kern.domainname with a nil value for oldp will result
in a length of zero being returned. If we hit this case use a length
of MAXHOSTNAMELEN (256).

R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5408041
src/pkg/syscall/syscall_bsd.go