Like FreeBSD, DragonFly does not provide a sysconf value for
_SC_GETPW_R_SIZE_MAX.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
14469043
var result *C.struct_passwd
var bufSize C.long
- if runtime.GOOS == "freebsd" {
- // FreeBSD doesn't have _SC_GETPW_R_SIZE_MAX
- // and just returns -1. So just use the same
- // size that Linux returns
+ if runtime.GOOS == "dragonfly" || runtime.GOOS == "freebsd" {
+ // DragonFly and FreeBSD do not have _SC_GETPW_R_SIZE_MAX
+ // and just return -1. So just use the same
+ // size that Linux returns.
bufSize = 1024
} else {
bufSize = C.sysconf(C._SC_GETPW_R_SIZE_MAX)