package/ti-sgx-um: fix Config.in
[buildroot-gz.git] / package / mono / 0009-fix-musl-incorrect-sigcontext-include.patch
blob3d932b6df9aa39612d9ca431436e725804856860
1 From 63f0b0246b8125ae48b15bd182bb5831be02e6c9 Mon Sep 17 00:00:00 2001
2 From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
3 Date: Mon, 27 Jun 2016 21:32:11 +0200
4 Subject: [PATCH] fix musl incorrect sigcontext include
6 On musl __GLIBC__ is not defined, so the conditional logic will
7 not produce correct result. Add a specific case to handle when
8 __GLIBC__ is not defined.
10 Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
11 ---
12 libgc/os_dep.c | 2 +-
13 mono/mini/exceptions-arm.c | 2 +-
14 2 files changed, 2 insertions(+), 2 deletions(-)
16 diff --git a/libgc/os_dep.c b/libgc/os_dep.c
17 index 8c8e098..34859c1 100644
18 --- a/libgc/os_dep.c
19 +++ b/libgc/os_dep.c
20 @@ -32,7 +32,7 @@
21 /* prototypes, so we have to include the top-level sigcontext.h to */
22 /* make sure the former gets defined to be the latter if appropriate. */
23 # include <features.h>
24 -# if 2 <= __GLIBC__
25 +# if 2 <= __GLIBC__ || !defined(__GLIBC__)
26 # if 2 == __GLIBC__ && 0 == __GLIBC_MINOR__
27 /* glibc 2.1 no longer has sigcontext.h. But signal.h */
28 /* has the right declaration for glibc 2.1. */
29 diff --git a/mono/mini/exceptions-arm.c b/mono/mini/exceptions-arm.c
30 index b036aa7..a3e2164 100644
31 --- a/mono/mini/exceptions-arm.c
32 +++ b/mono/mini/exceptions-arm.c
33 @@ -14,7 +14,7 @@
34 #include <string.h>
36 #ifndef MONO_CROSS_COMPILE
37 -#ifdef HAVE_ASM_SIGCONTEXT_H
38 +#if defined(HAVE_ASM_SIGCONTEXT_H) && defined(__GLIBC__)
39 #include <asm/sigcontext.h>
40 #endif /* def HAVE_ASM_SIGCONTEXT_H */
41 #endif
42 --
43 1.9.1