poky/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch
Wang Mingyu 949e2cc738 apr: upgrade 1.7.5 -> 1.7.6
0001-Add-option-to-disable-timed-dependant-tests.patch
0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch
0002-apr-Remove-workdir-path-references-from-installed-ap.patch
0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
refreshed for 1.7.6

(From OE-Core rev: 21721ba0701acbb691d59da7892af10a222d3fcb)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-05 11:02:22 +01:00

58 lines
1.8 KiB
Diff

From 84990901ba642238779c74a003c1f5e572ab8d38 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 26 Aug 2022 00:28:08 -0700
Subject: [PATCH] configure: Remove runtime test for mmap that can map
/dev/zero
This never works for cross-compile moreover it ends up disabling
ac_cv_file__dev_zero which then results in compiler errors in shared
mutexes
Upstream-Status: Inappropriate [Cross-compile specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.in | 30 ------------------------------
1 file changed, 30 deletions(-)
diff --git a/configure.in b/configure.in
index 3d42953..7e43b0f 100644
--- a/configure.in
+++ b/configure.in
@@ -1391,36 +1391,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm_unlink shmget shmat shmdt shmctl \
APR_CHECK_DEFINE(MAP_ANON, sys/mman.h)
AC_CHECK_FILE(/dev/zero)
-# Not all systems can mmap /dev/zero (such as HP-UX). Check for that.
-if test "$ac_cv_func_mmap" = "yes" &&
- test "$ac_cv_file__dev_zero" = "yes"; then
- AC_CACHE_CHECK([for mmap that can map /dev/zero],
- [ac_cv_mmap__dev_zero],
- [AC_TRY_RUN([#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#ifdef HAVE_SYS_MMAN_H
-#include <sys/mman.h>
-#endif
- int main(int argc, const char *argv[])
- {
- int fd;
- void *m;
- fd = open("/dev/zero", O_RDWR);
- if (fd < 0) {
- return 1;
- }
- m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
- if (m == (void *)-1) { /* aka MAP_FAILED */
- return 2;
- }
- if (munmap(m, sizeof(void*)) < 0) {
- return 3;
- }
- return 0;
- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])])
-fi
-
# Now we determine which one is our anonymous shmem preference.
haveshmgetanon="0"
havemmapzero="0"