diff --git a/dev-libs/libffi/libffi-3.2.1.recipe b/dev-libs/libffi/libffi-3.2.1.recipe index 9ebf4402c..438b664df 100644 --- a/dev-libs/libffi/libffi-3.2.1.recipe +++ b/dev-libs/libffi/libffi-3.2.1.recipe @@ -7,7 +7,7 @@ plugins." HOMEPAGE="http://sourceware.org/libffi" COPYRIGHT="1996-2013 Anthony Green, Red Hat, Inc and others." LICENSE="MIT" -REVISION="5" +REVISION="6" SOURCE_URI="ftp://sourceware.org/pub/libffi/libffi-$portVersion.tar.gz" CHECKSUM_SHA256="d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37" PATCHES="libffi-$portVersion.patchset" diff --git a/dev-libs/libffi/patches/libffi-3.2.1.patchset b/dev-libs/libffi/patches/libffi-3.2.1.patchset index 406538986..4481a7323 100644 --- a/dev-libs/libffi/patches/libffi-3.2.1.patchset +++ b/dev-libs/libffi/patches/libffi-3.2.1.patchset @@ -20,3 +20,29 @@ index 650ca69..02a1913 100644 -- 1.8.3.4 + +From 46ac95d3636b845de417cc97c426b98c89d9ea54 Mon Sep 17 00:00:00 2001 +From: Michael Lotz +Date: Fri, 12 Jun 2020 13:14:57 +0000 +Subject: Mark Haiku as needing PROT_WRITE | PROTO_EXEC for allocations. + +It uses the heap as a fallback, but its areas are marked non-executable +in Haiku so function calls into there will segfault with a permission +denied error. + +diff --git a/configure b/configure +index c6da467..d856e1a 100755 +--- a/configure ++++ b/configure +@@ -18530,7 +18530,7 @@ case "$target" in + $as_echo "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h + + ;; +- *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*) ++ *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris* | *-*-haiku*) + + $as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h + +-- +2.26.0 +