1 From 8a2b550a510cf2a1a0989fc0a665a6a42c83efd4 Mon Sep 17 00:00:00 2001
2 From: "Peter S. Mazinger" <ps.m@gmx.net>
3 Date: Fri, 22 Apr 2011 00:52:22 +0200
4 Subject: [PATCH] make NPTL's getpid behave similar to the common one
7 provide getppid alias if needed
8 remove unneeded libc_hidden_proto
10 Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
11 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c | 11 ++++++++---
14 1 file changed, 8 insertions(+), 3 deletions(-)
16 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c b/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
17 index d4de3cd..d2b3384 100644
18 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
19 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
26 +# define __NR_getpid __NR_getxpid
30 static inline __attribute__((always_inline)) pid_t really_getpid (pid_t oldval);
31 @@ -46,8 +50,7 @@ really_getpid (pid_t oldval)
35 -extern __typeof(getpid) __getpid;
41 @@ -60,6 +63,8 @@ __getpid (void)
45 -libc_hidden_proto(getpid)
46 weak_alias(__getpid, getpid)
47 libc_hidden_weak(getpid)
48 +#if !defined NOT_IN_libc && !defined __NR_getppid
49 +strong_alias(getpid,getppid)