aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'process.c')
-rw-r--r--process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/process.c b/process.c
index 5fd08c3e61..c608721713 100644
--- a/process.c
+++ b/process.c
@@ -4808,13 +4808,13 @@ obj2gid(VALUE id
grptr = getgrnam(grpname);
#endif
if (!grptr) {
-#ifndef USE_GETGRNAM_R
+#if !defined(USE_GETGRNAM_R) && defined(HAVE_ENDGRENT)
endgrent();
#endif
rb_raise(rb_eArgError, "can't find group for %s", grpname);
}
gid = grptr->gr_gid;
-#ifndef USE_GETGRNAM_R
+#if !defined(USE_GETGRNAM_R) && defined(HAVE_ENDGRENT)
endgrent();
#endif
}