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-.patch57
1 files changed, 57 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..7e22270b88
--- /dev/null
+++ b/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch
@@ -0,0 +1,57 @@
1From 84990901ba642238779c74a003c1f5e572ab8d38 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 configure.in | 30 ------------------------------
15 1 file changed, 30 deletions(-)
16
17diff --git a/configure.in b/configure.in
18index 3d42953..7e43b0f 100644
19--- a/configure.in
20+++ b/configure.in
21@@ -1391,36 +1391,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm_unlink shmget shmat shmdt shmctl \
22 APR_CHECK_DEFINE(MAP_ANON, sys/mman.h)
23 AC_CHECK_FILE(/dev/zero)
24
25-# Not all systems can mmap /dev/zero (such as HP-UX). Check for that.
26-if test "$ac_cv_func_mmap" = "yes" &&
27- test "$ac_cv_file__dev_zero" = "yes"; then
28- AC_CACHE_CHECK([for mmap that can map /dev/zero],
29- [ac_cv_mmap__dev_zero],
30- [AC_TRY_RUN([#include <sys/types.h>
31-#include <sys/stat.h>
32-#include <fcntl.h>
33-#ifdef HAVE_SYS_MMAN_H
34-#include <sys/mman.h>
35-#endif
36- int main(int argc, const char *argv[])
37- {
38- int fd;
39- void *m;
40- fd = open("/dev/zero", O_RDWR);
41- if (fd < 0) {
42- return 1;
43- }
44- m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
45- if (m == (void *)-1) { /* aka MAP_FAILED */
46- return 2;
47- }
48- if (munmap(m, sizeof(void*)) < 0) {
49- return 3;
50- }
51- return 0;
52- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])])
53-fi
54-
55 # Now we determine which one is our anonymous shmem preference.
56 haveshmgetanon="0"
57 havemmapzero="0"