1 From 74c69da52ad5029cd2fc2d3d41d581022ed0a7aa Mon Sep 17 00:00:00 2001
2 From: Waldemar Brodkorb <wbx@openadk.org>
3 Date: Wed, 15 Apr 2015 12:47:57 -0500
4 Subject: [PATCH] fix static linking of pthread apps
6 When compiling python you get duplicate symbol problem.
7 Seen in the autobuilders of buildroot project.
9 Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
11 libc/sysdeps/linux/common/setregid.c | 2 +-
12 libc/sysdeps/linux/common/setresgid.c | 4 ++--
13 libc/sysdeps/linux/common/setresuid.c | 4 ++--
14 3 files changed, 5 insertions(+), 5 deletions(-)
16 diff --git a/libc/sysdeps/linux/common/setregid.c b/libc/sysdeps/linux/common/setregid.c
17 index 15d590a..aaa7293 100644
18 --- a/libc/sysdeps/linux/common/setregid.c
19 +++ b/libc/sysdeps/linux/common/setregid.c
20 @@ -37,4 +37,4 @@ int setregid(gid_t rgid, gid_t egid)
24 -libc_hidden_def(setregid)
25 +libc_hidden_weak(setregid)
26 diff --git a/libc/sysdeps/linux/common/setresgid.c b/libc/sysdeps/linux/common/setresgid.c
27 index 95decc2..b6d1647 100644
28 --- a/libc/sysdeps/linux/common/setresgid.c
29 +++ b/libc/sysdeps/linux/common/setresgid.c
31 # define __NR_setresgid __NR_setresgid32
33 _syscall3(int, setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid)
34 -libc_hidden_def(setresgid)
35 +libc_hidden_weak(setresgid)
37 #elif defined(__NR_setresgid)
39 @@ -34,7 +34,7 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid)
41 return (__syscall_setresgid(rgid, egid, sgid));
43 -libc_hidden_def(setresgid)
44 +libc_hidden_weak(setresgid)
48 diff --git a/libc/sysdeps/linux/common/setresuid.c b/libc/sysdeps/linux/common/setresuid.c
49 index 022ccfe..a2a2183 100644
50 --- a/libc/sysdeps/linux/common/setresuid.c
51 +++ b/libc/sysdeps/linux/common/setresuid.c
53 # define __NR_setresuid __NR_setresuid32
55 _syscall3(int, setresuid, uid_t, ruid, uid_t, euid, uid_t, suid)
56 -libc_hidden_def(setresuid)
57 +libc_hidden_weak(setresuid)
59 #elif defined(__NR_setresuid)
61 @@ -34,7 +34,7 @@ int setresuid(uid_t ruid, uid_t euid, uid_t suid)
63 return (__syscall_setresuid(ruid, euid, suid));
65 -libc_hidden_def(setresuid)
66 +libc_hidden_weak(setresuid)