From 96bf3cf8bf63a2dc0c941db7b581e0d4f9753b45 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 12 Jan 2016 20:29:58 +0100 Subject: [PATCH] libffi: make this work correctly on musl; patch via Alpine. See http://bugs.alpinelinux.org/issues/4275 --- .../libffi/patches/libffi-fix-define-for-musl.patch | 13 +++++++++++++ srcpkgs/libffi/template | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/libffi/patches/libffi-fix-define-for-musl.patch diff --git a/srcpkgs/libffi/patches/libffi-fix-define-for-musl.patch b/srcpkgs/libffi/patches/libffi-fix-define-for-musl.patch new file mode 100644 index 00000000000..ab8f9486cdf --- /dev/null +++ b/srcpkgs/libffi/patches/libffi-fix-define-for-musl.patch @@ -0,0 +1,13 @@ +http://bugs.alpinelinux.org/issues/4275 + +--- src/closures.c.orig ++++ src/closures.c +@@ -34,7 +34,7 @@ + #include + + #if !FFI_MMAP_EXEC_WRIT && !FFI_EXEC_TRAMPOLINE_TABLE +-# if __gnu_linux__ && !defined(__ANDROID__) ++# if __linux__ && !defined(__ANDROID__) + /* This macro indicates it may be forbidden to map anonymous memory + with both write and execute permission. Code compiled when this + option is defined will attempt to map such pages once, but if it diff --git a/srcpkgs/libffi/template b/srcpkgs/libffi/template index d83b565b2df..89b408e8f8c 100644 --- a/srcpkgs/libffi/template +++ b/srcpkgs/libffi/template @@ -1,7 +1,7 @@ # Template file for 'libffi' pkgname=libffi version=3.2.1 -revision=1 +revision=2 build_style=gnu-configure configure_args="--includedir=/usr/include --with-pic" short_desc="Library supporting Foreign Function Interfaces"