diff options
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-.patch | 62 |
1 files changed, 62 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..fa6202da79 --- /dev/null +++ b/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From ee728971fd9d2da39356f1574d58d5daa3b24520 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 26 Aug 2022 00:28:08 -0700 | ||
4 | Subject: [PATCH] configure: Remove runtime test for mmap that can map | ||
5 | /dev/zero | ||
6 | |||
7 | This never works for cross-compile moreover it ends up disabling | ||
8 | ac_cv_file__dev_zero which then results in compiler errors in shared | ||
9 | mutexes | ||
10 | |||
11 | Upstream-Status: Inappropriate [Cross-compile specific] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | configure.in | 32 -------------------------------- | ||
15 | 1 file changed, 32 deletions(-) | ||
16 | |||
17 | diff --git a/configure.in b/configure.in | ||
18 | index a99049d..f1f55c7 100644 | ||
19 | --- a/configure.in | ||
20 | +++ b/configure.in | ||
21 | @@ -1182,38 +1182,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_MSG_CHECKING(for mmap that can map /dev/zero) | ||
29 | - AC_TRY_RUN([ | ||
30 | -#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() | ||
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 | - | ||
54 | - AC_MSG_RESULT($ac_cv_file__dev_zero) | ||
55 | -fi | ||
56 | - | ||
57 | # Now we determine which one is our anonymous shmem preference. | ||
58 | haveshmgetanon="0" | ||
59 | havemmapzero="0" | ||
60 | -- | ||
61 | 2.37.2 | ||
62 | |||