summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-27 15:38:36 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-27 15:38:36 +0000
commit1a67580eb5ddbb6f81c635740614c48eb6cccd14 (patch)
treebe55baba6809d7e94b6b81a66a8a17790eee569a /process.c
parentb5e8e33ddc880c98c30a1abe644c6af2e57b5496 (diff)
* process.c (obj2gid): Don't call endgrnam() if not exist.
Bionic (Android's libc) don't have endgrnam(). * configure.in: Check endgrnam function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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
}