From 9dbaa991819fde8a0afed727506290ee993d2eef Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 19 Dec 2016 02:06:19 -0500 Subject: Use x/sys/unix instead of the deprecated syscall. --- getgr/getgr.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'getgr') 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 { -- cgit v1.2.3-2-g168b