From 05e2023f74d510c833541e0b1502a720557280a0 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Tue, 19 May 2015 16:38:52 +0200 Subject: [PATCH] gc: fix musl build. (patch from Alpine.) --- srcpkgs/gc/patches/fix-boehm-gc.patch | 11 +++++++++++ srcpkgs/gc/template | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 srcpkgs/gc/patches/fix-boehm-gc.patch diff --git a/srcpkgs/gc/patches/fix-boehm-gc.patch b/srcpkgs/gc/patches/fix-boehm-gc.patch new file mode 100644 index 00000000000..5c69b6d7522 --- /dev/null +++ b/srcpkgs/gc/patches/fix-boehm-gc.patch @@ -0,0 +1,11 @@ +--- os_dep.c ++++ os_dep.c +@@ -26,7 +26,7 @@ + # define __KERNEL__ + # include + # 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 */ diff --git a/srcpkgs/gc/template b/srcpkgs/gc/template index ffb3f4b6905..7940679b96a 100644 --- a/srcpkgs/gc/template +++ b/srcpkgs/gc/template @@ -5,6 +5,10 @@ revision=1 build_style=gnu-configure hostmakedepends="automake pkg-config libtool" makedepends="libatomic_ops-devel" +case "$XBPS_TARGET_MACHINE" in +*-musl) + CFLAGS='-D_GNU_SOURCE -DNO_GETCONTEXT -DUSE_MMAP' +esac short_desc="A garbage collector for C and C++" maintainer="Juan RP " homepage="http://www.hboehm.info/gc/"