void-packages/srcpkgs/guile1.8/patches/musl-sigcontext.patch
2017-10-22 12:09:47 +02:00

49 lines
2.1 KiB
Diff

When checking for the location of the sigcontext struct it is not taken into
account that a different libc than glibc could be used. It falls back to libc5
which leads to a sigcontext redefinition error when using the musl libc. The
patch simply removes the misleading checks since we're way beyond those
versions anyway.
--- libguile/gc_os_dep.c.orig 2010-12-13 18:25:01.000000000 +0100
+++ libguile/gc_os_dep.c 2017-09-17 23:01:55.494204333 +0200
@@ -1445,40 +1445,6 @@
/* include assembly code to do it well. */
# endif
-# if defined(LINUX) && !defined(POWERPC)
-
-# if 0
-# include <linux/version.h>
-# if (LINUX_VERSION_CODE <= 0x10400)
- /* Ugly hack to get struct sigcontext_struct definition. Required */
- /* for some early 1.3.X releases. Will hopefully go away soon. */
- /* in some later Linux releases, asm/sigcontext.h may have to */
- /* be included instead. */
-# define __KERNEL__
-# include <asm/signal.h>
-# undef __KERNEL__
-# endif
-
-# else
-
- /* 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 */
- /* make sure the former gets defined to be the latter if appropriate. */
-# include <features.h>
-# if 2 <= __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. */
-# include <sigcontext.h>
-# endif /* 0 == __GLIBC_MINOR__ */
-# else /* not 2 <= __GLIBC__ */
- /* libc5 doesn't have <sigcontext.h>: go directly with the kernel */
- /* one. Check LINUX_VERSION_CODE to see which we should reference. */
-# include <asm/sigcontext.h>
-# endif /* 2 <= __GLIBC__ */
-# endif
-# endif
# if !defined(OS2) && !defined(PCR) && !defined(AMIGA) && !defined(MACOS)
# include <sys/types.h>
# if !defined(MSWIN32) && !defined(SUNOS4)