diff options
author | Mark Salter <msalter@redhat.com> | 2012-04-26 10:14:01 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-04-26 22:48:22 -0400 |
commit | 9f096becc4b9a49051eceb6c94a3c088c519c04d (patch) | |
tree | 1e868e629830b98da8fca2e1892b296c2fc25e8a /libc/sysdeps/linux/common/stubs.c | |
parent | 9756397b620c3880b94b9db3da96892fa952a3cf (diff) |
getpgrp: fix fallback handling
The test for generating a stub for getpgrp was wrong and would
result in duplicate symbols when building without __NR_getpgrp,
but with __NR_getpgid and __NR_getpid.
A closer look at the getpgrp implementation using getpgid showed
that getpid was being called to pass the current pid to getpgid.
This is unnecessary because passing 0 to getpgid returns the
pgid of the current process.
This patch cleans up the getpgrp implementation and the stub test.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libc/sysdeps/linux/common/stubs.c')
-rw-r--r-- | libc/sysdeps/linux/common/stubs.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |