[libgc] fix musl incorrect sigcontext include
authorAngelo Compagnucci <angelo.compagnucci@gmail.com>
Mon, 27 Jun 2016 19:32:11 +0000 (21:32 +0200)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Thu, 28 Jul 2016 13:56:09 +0000 (15:56 +0200)
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.

libgc/os_dep.c

index 8c8e0981dd6e236f531abd538290c5cd11865bed..191e4b4ed7d06a8ea02f73a38ea84b941fc758c5 100644 (file)
@@ -26,7 +26,7 @@
 #     define __KERNEL__
 #     include <asm/signal.h>
 #     undef __KERNEL__
-#   else
+#   elif defined(__GLIBC__)
       /* Kernels prior to 2.1.1 defined struct sigcontext_struct instead of */
       /* struct sigcontext.  libc6 (glibc2) uses "struct sigcontext" in     */
       /* prototypes, so we have to include the top-level sigcontext.h to    */