diff options
Diffstat (limited to 'getgr')
-rw-r--r-- | getgr/getgr.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/getgr/getgr.go b/getgr/getgr.go index 7757e2e..4dd6f21 100644 --- a/getgr/getgr.go +++ b/getgr/getgr.go @@ -21,8 +21,9 @@ package getgr import ( - "syscall" "unsafe" + + "golang.org/x/sys/unix" ) //#define _POSIX_SOURCE // for getgrnam_r(3) in grp.h @@ -70,7 +71,7 @@ func ByName(name string) (*Group, error) { if success >= 0 { break } - if errno == syscall.ERANGE { + if errno == unix.ERANGE { buflen += 256 buf = make([]byte, buflen) } else { @@ -104,7 +105,7 @@ func ByGid(gid int32) (*Group, error) { if success >= 0 { break } - if errno == syscall.ERANGE { + if errno == unix.ERANGE { buflen += 256 buf = make([]byte, buflen) } else { |