From 57ca06bd8a4974e109d1cb5e8507f79d07f63031 Mon Sep 17 00:00:00 2001 From: PulkoMandy Date: Sun, 15 Sep 2024 11:04:15 +0200 Subject: [PATCH] apr: fix named shared memory Anonymous shared memory was changed previously to use UNIX code, but named shared memory had not been adjusted. So the configure script was trying to enable BeOS code and half of UNIX code, and things didn't work. Now we fully use the UNIX code based on mmap(). Fix #11124 --- dev-libs/apr/apr-1.7.4.recipe | 2 +- dev-libs/apr/patches/apr-1.7.4.patchset | 39 +++++++++++++++++++++---- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/dev-libs/apr/apr-1.7.4.recipe b/dev-libs/apr/apr-1.7.4.recipe index 593b516aa..10814e84c 100644 --- a/dev-libs/apr/apr-1.7.4.recipe +++ b/dev-libs/apr/apr-1.7.4.recipe @@ -24,7 +24,7 @@ following: HOMEPAGE="http://apr.apache.org/" COPYRIGHT="2012 The Apache Software Foundation" LICENSE="Apache v2" -REVISION="1" +REVISION="2" SOURCE_URI="http://archive.apache.org/dist/apr/apr-$portVersion.tar.gz" CHECKSUM_SHA256="a4137dd82a185076fa50ba54232d920a17c6469c30b0876569e1c2a05ff311d9" PATCHES="apr-$portVersion.patchset" diff --git a/dev-libs/apr/patches/apr-1.7.4.patchset b/dev-libs/apr/patches/apr-1.7.4.patchset index bd423efb5..41d04d2e0 100644 --- a/dev-libs/apr/patches/apr-1.7.4.patchset +++ b/dev-libs/apr/patches/apr-1.7.4.patchset @@ -1,4 +1,4 @@ -From ff0c8a322c31cbd0f7140bce8bed5af23a797bce Mon Sep 17 00:00:00 2001 +From 288156a6b1e48e401d66b3f53b488cb946414cf2 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 15 Jul 2017 13:50:02 +0200 Subject: apply 1.5.2 patch. @@ -48,10 +48,10 @@ index ff92e55..957dbf7 100644 AC_CHECK_LIB(truerand, main) AC_SEARCH_LIBS(modf, m) -- -2.37.3 +2.45.2 -From fd46bb90ed37f36f6e1923ec13092615fcab6a01 Mon Sep 17 00:00:00 2001 +From fcb999d16ab8f9c389e73998e743817697471fd1 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Mon, 25 Apr 2022 21:18:48 +0200 Subject: Haiku: decide to use standard POSIX methods @@ -84,10 +84,10 @@ index 957dbf7..3adc0c2 100644 AC_DEFINE_UNQUOTED($ac_decision) -- -2.37.3 +2.45.2 -From a74ca483388d315af1ea921baac260ebb54ccd18 Mon Sep 17 00:00:00 2001 +From e0f60692049da2c853a66db8e63d0c950e720380 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Tue, 26 Apr 2022 14:42:58 +0200 Subject: fix checking if fcntl returns EACCES when F_SETLK is already held @@ -112,5 +112,32 @@ index 3adc0c2..dc1f3d1 100644 int lockit() { -- -2.37.3 +2.45.2 + + +From 27d0dab886d8108ccf5c36ae44bbaf42bd13dc26 Mon Sep 17 00:00:00 2001 +From: PulkoMandy +Date: Sun, 15 Sep 2024 10:46:58 +0200 +Subject: Fix named shared memory + +A previous patch disabled the area based shared memory but enabled only +one of the UNIX shared memory implementations, allowing only anonymous +shared memory to be created. + +diff --git a/configure.in b/configure.in +index dc1f3d1..9b91539 100644 +--- a/configure.in ++++ b/configure.in +@@ -1487,6 +1487,9 @@ case $host in + USE_SHMEM_SHMGET) + fi + ;; ++ *haiku* ) ++ APR_DECISION_OVERRIDE(USE_SHMEM_MMAP_TMP) ++ ;; + *aix* ) + # AIX cannot lseek() shared memory, and we always truncate/lseek together + APR_DECISION_OVERRIDE(USE_SHMEM_SHMGET) +-- +2.45.2