summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-misc.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2018-02-25 23:55:41 +1100
committerDarren Tucker <dtucker@dtucker.net>2018-02-26 00:14:42 +1100
commitc7b5a47e3b9db9a0f0198f9c90c705f6307afc2b (patch)
treef0b486ac5bb76056b06d55eff3dd37e7d503a697 /openbsd-compat/bsd-misc.c
parentb39593a6de5290650a01adf8699c6460570403c2 (diff)
Invert sense of getpgrp test.
AC_FUNC_GETPGRP tests if getpgrp(0) works, which it does if it's not declared. Instead, test if the zero-arg version we want to use works.
Diffstat (limited to 'openbsd-compat/bsd-misc.c')
-rw-r--r--openbsd-compat/bsd-misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index a2f75055..f7187daf 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -238,7 +238,7 @@ isblank(int c)
pid_t
getpgid(pid_t pid)
{
-#if defined(HAVE_GETPGRP) && !defined(GETPGRP_VOID)
+#if defined(HAVE_GETPGRP) && !defined(GETPGRP_VOID) && GETPGRP_VOID == 0
return getpgrp(pid);
#elif defined(HAVE_GETPGRP)
if (pid == 0)