The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / uclibc / 0.9.33.2 / 0026-make-NPTL-s-getpid-behave-similar-to-the-common-one.patch
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
5
6 make __getpid static
7 provide getppid alias if needed
8 remove unneeded libc_hidden_proto
9
10 Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
11 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 ---
13  libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c |   11 ++++++++---
14  1 file changed, 8 insertions(+), 3 deletions(-)
15
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
20 @@ -21,6 +21,10 @@
21  #include <tls.h>
22  #include <sysdep.h>
23  
24 +#ifdef __NR_getxpid
25 +# undef __NR_getpid
26 +# define __NR_getpid __NR_getxpid
27 +#endif
28  
29  #ifndef NOT_IN_libc
30  static inline __attribute__((always_inline)) pid_t really_getpid (pid_t oldval);
31 @@ -46,8 +50,7 @@ really_getpid (pid_t oldval)
32  }
33  #endif
34  
35 -extern __typeof(getpid) __getpid;
36 -pid_t
37 +static pid_t
38  __getpid (void)
39  {
40  #ifdef NOT_IN_libc
41 @@ -60,6 +63,8 @@ __getpid (void)
42  #endif
43    return result;
44  }
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)
50 +#endif
51 -- 
52 1.7.10.4
53