summaryrefslogtreecommitdiff
path: root/getgr
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-12-19 02:06:19 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-12-19 02:06:19 -0500
commit9dbaa991819fde8a0afed727506290ee993d2eef (patch)
tree62bf9ae885c6130f3659aac889e6e4eeb8a8fcf8 /getgr
parentfc5d64a5fc886e0b8519e8c19d311ebfb0df59db (diff)
Use x/sys/unix instead of the deprecated syscall.
Diffstat (limited to 'getgr')
-rw-r--r--getgr/getgr.go7
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 {