summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch')
-rw-r--r--meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch b/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch
new file mode 100644
index 0000000000..a78b16284f
--- /dev/null
+++ b/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch
@@ -0,0 +1,58 @@
1From 316b81c462f065927d7fec56aadd5c8cb94d1cf0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 26 Aug 2022 00:28:08 -0700
4Subject: [PATCH] configure: Remove runtime test for mmap that can map
5 /dev/zero
6
7This never works for cross-compile moreover it ends up disabling
8ac_cv_file__dev_zero which then results in compiler errors in shared
9mutexes
10
11Upstream-Status: Inappropriate [Cross-compile specific]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13
14---
15 configure.in | 30 ------------------------------
16 1 file changed, 30 deletions(-)
17
18diff --git a/configure.in b/configure.in
19index 3663220..dce9789 100644
20--- a/configure.in
21+++ b/configure.in
22@@ -1303,36 +1303,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm_unlink shmget shmat shmdt shmctl \
23 APR_CHECK_DEFINE(MAP_ANON, sys/mman.h)
24 AC_CHECK_FILE(/dev/zero)
25
26-# Not all systems can mmap /dev/zero (such as HP-UX). Check for that.
27-if test "$ac_cv_func_mmap" = "yes" &&
28- test "$ac_cv_file__dev_zero" = "yes"; then
29- AC_CACHE_CHECK([for mmap that can map /dev/zero],
30- [ac_cv_mmap__dev_zero],
31- [AC_TRY_RUN([#include <sys/types.h>
32-#include <sys/stat.h>
33-#include <fcntl.h>
34-#ifdef HAVE_SYS_MMAN_H
35-#include <sys/mman.h>
36-#endif
37- int main()
38- {
39- int fd;
40- void *m;
41- fd = open("/dev/zero", O_RDWR);
42- if (fd < 0) {
43- return 1;
44- }
45- m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
46- if (m == (void *)-1) { /* aka MAP_FAILED */
47- return 2;
48- }
49- if (munmap(m, sizeof(void*)) < 0) {
50- return 3;
51- }
52- return 0;
53- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])])
54-fi
55-
56 # Now we determine which one is our anonymous shmem preference.
57 haveshmgetanon="0"
58 havemmapzero="0"