[PATCH] libc: Provide both getpgid and __getpgid symbols
Carmelo AMOROSO
carmelo.amoroso at st.com
Mon Aug 23 22:41:24 UTC 2010
Indeed unistd.h header does export '__getpgid' by default, while
uClibc provide only 'getpgid' implementation. The 'getpgid' symbol
is exported by standard header if __USE_XOPEN_EXTENDED is defined.
This patch alignes uClibc implementation with standard header (matching
with glibc behaviour).
Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
---
libc/sysdeps/linux/common/getpgid.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libc/sysdeps/linux/common/getpgid.c b/libc/sysdeps/linux/common/getpgid.c
index cf1c0fc..8e7516f 100644
--- a/libc/sysdeps/linux/common/getpgid.c
+++ b/libc/sysdeps/linux/common/getpgid.c
@@ -15,8 +15,11 @@
#define __NR___syscall_getpgid __NR_getpgid
static __inline__ _syscall1(__kernel_pid_t, __syscall_getpgid, __kernel_pid_t, pid)
-pid_t getpgid(pid_t pid)
+pid_t __getpgid(pid_t pid)
{
return (__syscall_getpgid(pid));
}
+#ifdef __USE_XOPEN_EXTENDED
+weak_alias(__getpgid,getpgid)
+#endif
#endif
--
1.5.5.6
More information about the uClibc
mailing list