sngrep: fix error if gnutls and openssl are both enabled
[buildroot-gz.git] / package / xenomai / 0001-bfin-remove-inline-keyword.patch
blob376bd21c370fc3b43d3a729d6be6968832ab8b96
1 From 2a96c8bbe19a193d9ae6d0780fc274abc4df03e3 Mon Sep 17 00:00:00 2001
2 From: Romain Naour <romain.naour@gmail.com>
3 Date: Sat, 5 Nov 2016 19:09:00 +0100
4 Subject: [PATCH] bfin: remove inline keyword
6 Xenomai user space tools fail to build for bfin target since it's
7 provide it's own pthread_atfork(), shm_open() and shm_unlink()
8 definition using the inline keyword and weak attribute.
10 With gcc 5+ the weak attribute is discarded by the inline keyword,
11 so each symbol are global and are redefined several time while
12 linking.
14 Fixes:
15 http://autobuild.buildroot.net/results/0c2/0c2e5eb4edd4f9427f61d3c9b67a12a7a0e24140
17 Patch status: upstream,
18 https://git.xenomai.org/xenomai-2.6.git/commit/?id=917dcebb26ec492f276cdc3b55867aa90e01fa12
20 Signed-off-by: Romain Naour <romain.naour@gmail.com>
21 ---
22 include/asm-blackfin/syscall.h | 10 +++++-----
23 1 file changed, 5 insertions(+), 5 deletions(-)
25 diff --git a/include/asm-blackfin/syscall.h b/include/asm-blackfin/syscall.h
26 index 9eda8b9..b5728b5 100644
27 --- a/include/asm-blackfin/syscall.h
28 +++ b/include/asm-blackfin/syscall.h
29 @@ -132,9 +132,9 @@ static inline int __xn_interrupted_p(struct pt_regs *regs)
30 #define XENOMAI_SKINCALL5(id,op,a1,a2,a3,a4,a5) XENOMAI_DO_SYSCALL(5,id,op,a1,a2,a3,a4,a5)
32 /* uClibc does not provide pthread_atfork() for this arch; provide it
33 - here. Note: let the compiler decides whether it wants to actually
34 - inline this routine, i.e. do not force always_inline. */
35 -inline __attribute__((weak)) int pthread_atfork(void (*prepare)(void),
36 + here.
37 +*/
38 +__attribute__((weak)) int pthread_atfork(void (*prepare)(void),
39 void (*parent)(void),
40 void (*child)(void))
42 @@ -143,7 +143,7 @@ inline __attribute__((weak)) int pthread_atfork(void (*prepare)(void),
44 #include <errno.h>
46 -inline __attribute__((weak)) int shm_open(const char *name,
47 +__attribute__((weak)) int shm_open(const char *name,
48 int oflag,
49 mode_t mode)
51 @@ -151,7 +151,7 @@ inline __attribute__((weak)) int shm_open(const char *name,
52 return -1;
55 -inline __attribute__((weak)) int shm_unlink(const char *name)
56 +__attribute__((weak)) int shm_unlink(const char *name)
58 errno = ENOSYS;
59 return -1;
60 --
61 2.5.5