summaryrefslogtreecommitdiff
path: root/libc/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps')
-rw-r--r--libc/sysdeps/linux/common/getpgrp.c5
-rw-r--r--libc/sysdeps/linux/common/stubs.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/common/getpgrp.c b/libc/sysdeps/linux/common/getpgrp.c
index 0af9dc499..14912c376 100644
--- a/libc/sysdeps/linux/common/getpgrp.c
+++ b/libc/sysdeps/linux/common/getpgrp.c
@@ -13,10 +13,9 @@
#ifdef __NR_getpgrp
/* According to the manpage the POSIX.1 version is favoured */
_syscall_noerr0(pid_t, getpgrp)
-#elif defined __NR_getpgid && (defined __NR_getpid || defined __NR_getxpid)
-/* IA64 doesn't have a getpgrp syscall */
+#elif defined __NR_getpgid
pid_t getpgrp(void)
{
- return getpgid(getpid());
+ return getpgid(0);
}
#endif
diff --git a/libc/sysdeps/linux/common/stubs.c b/libc/sysdeps/linux/common/stubs.c
index a4c16b9b9..3567b0786 100644
--- a/libc/sysdeps/linux/common/stubs.c
+++ b/libc/sysdeps/linux/common/stubs.c
@@ -150,7 +150,7 @@ make_stub(get_kernel_syms)
make_stub(getpeername)
#endif
-#if !defined(__NR_getpgrp) && (defined(__NR_getpgid) && (defined(__NR_getpid) || defined(__NR_getxpid)))
+#if !defined __NR_getpgrp && !defined __NR_getpgid
make_stub(getpgrp)
#endif