Skip to contentSkip to conversation

package/mono: fix sigcontext incorrect include

PATCH New Angelo Compagnucci 2 participants 2 messages Jun 27, 2016 – Jun 28, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/mono: fix sigcontext incorrect include

This patch solves incorrect inclusion of sigcontext.h on musl. The patch was submitted upstream.

---
 ...009-fix-musl-incorrect-sigcontext-include.patch | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 package/mono/0009-fix-musl-incorrect-sigcontext-include.patch
package/mono/0009-fix-musl-incorrect-sigcontext-include.patch new file +44 -0
new file mode 100644
index 0000000..3d932b6
@@ -0,0 +1,44 @@
+From 63f0b0246b8125ae48b15bd182bb5831be02e6c9 Mon Sep 17 00:00:00 2001
+From: Angelo Compagnucci <[email protected]>
+Date: Mon, 27 Jun 2016 21:32:11 +0200
+Subject: [PATCH] fix musl incorrect sigcontext include
+
+On musl __GLIBC__ is not defined, so the conditional logic will
+not produce correct result. Add a specific case to handle when
+__GLIBC__ is not defined.
+
+Signed-off-by: Angelo Compagnucci <[email protected]>
+---
+ libgc/os_dep.c             | 2 +-
+ mono/mini/exceptions-arm.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libgc/os_dep.c b/libgc/os_dep.c
+index 8c8e098..34859c1 100644
+--- a/libgc/os_dep.c
++++ b/libgc/os_dep.c
+@@ -32,7 +32,7 @@
+       /* prototypes, so we have to include the top-level sigcontext.h to    */
+       /* make sure the former gets defined to be the latter if appropriate. */
+ #     include <features.h>
+-#     if 2 <= __GLIBC__
++#     if 2 <= __GLIBC__ || !defined(__GLIBC__)
+ #       if 2 == __GLIBC__ && 0 == __GLIBC_MINOR__
+ 	  /* glibc 2.1 no longer has sigcontext.h.  But signal.h	*/
+ 	  /* has the right declaration for glibc 2.1.			*/
+diff --git a/mono/mini/exceptions-arm.c b/mono/mini/exceptions-arm.c
+index b036aa7..a3e2164 100644
+--- a/mono/mini/exceptions-arm.c
++++ b/mono/mini/exceptions-arm.c
+@@ -14,7 +14,7 @@
+ #include <string.h>
+ 
+ #ifndef MONO_CROSS_COMPILE
+-#ifdef HAVE_ASM_SIGCONTEXT_H
++#if defined(HAVE_ASM_SIGCONTEXT_H) && defined(__GLIBC__)
+ #include <asm/sigcontext.h>
+ #endif  /* def HAVE_ASM_SIGCONTEXT_H */
+ #endif
+-- 
+1.9.1
+
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 package/mono: fix sigcontext incorrect include

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Angelo" == Angelo Compagnucci <[email protected]> writes:

This patch solves incorrect inclusion of sigcontext.h on musl. The patch was submitted upstream.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard