$(call autoconf_bool,CONFIG_IPV6,ipv6)
# XXX: ac_cv_sizeof_struct_iovec=1 is just to trick configure
+# XXX: don't set apr_cv_use_lfs64=yes, see
+# https://www.openwall.com/lists/musl/2020/02/03/18
+# XXX: the atomic builtins used require 8-byte intrinsics, which are available
+# on all 64-bit architectures and some arm as well as x86 32-bit platforms
CONFIGURE_VARS += \
+ ap_cv_atomic_builtins=$(if $(CONFIG_ARCH_64BIT),yes,no) \
ac_cv_file__dev_zero=yes \
ac_cv_func_pthread_mutexattr_setpshared=yes \
ac_cv_func_sem_open=yes \
ac_cv_func_setpgrp_void=yes \
+ ac_cv_mmap__dev_zero=yes \
+ ac_cv_negative_eai=yes \
ac_cv_o_nonblock_inherited=no \
ac_cv_sizeof_struct_iovec=1 \
ac_cv_struct_rlimit=yes \
apr_cv_dup3=yes \
apr_cv_epoll=yes \
apr_cv_epoll_create1=yes \
+ apr_cv_gai_addrconfig=yes \
apr_cv_mutex_recursive=yes \
apr_cv_mutex_robust_shared=yes \
apr_cv_process_shared_works=yes \
+ apr_cv_pthreads_lib=-lpthread \
apr_cv_sock_cloexec=yes \
- apr_cv_tcp_nodelay_with_cork=yes \
- apr_cv_use_lfs64=yes
+ apr_cv_tcp_nodelay_with_cork=yes
+
+ifeq ($(call qstrip,$(CONFIG_LIBC)),musl)
+CONFIGURE_VARS += \
+ ac_cv_strerror_r_rc_int=yes
+endif
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1 \
--- /dev/null
+--- a/build/apr_common.m4
++++ b/build/apr_common.m4
+@@ -526,8 +526,9 @@ dnl string.
+ dnl
+ dnl
+ AC_DEFUN([APR_CHECK_STRERROR_R_RC], [
+-AC_MSG_CHECKING(for type of return code from strerror_r)
+-AC_TRY_RUN([
++AC_CACHE_CHECK([whether return code from strerror_r has type int],
++[ac_cv_strerror_r_rc_int],
++[AC_TRY_RUN([
+ #include <errno.h>
+ #include <string.h>
+ #include <stdio.h>
+@@ -543,14 +544,10 @@ main()
+ }], [
+ ac_cv_strerror_r_rc_int=yes ], [
+ ac_cv_strerror_r_rc_int=no ], [
+- ac_cv_strerror_r_rc_int=no ] )
++ ac_cv_strerror_r_rc_int=no ] ) ] )
+ if test "x$ac_cv_strerror_r_rc_int" = xyes; then
+ AC_DEFINE(STRERROR_R_RC_INT, 1, [Define if strerror returns int])
+- msg="int"
+-else
+- msg="pointer"
+ fi
+-AC_MSG_RESULT([$msg])
+ ] )
+
+ dnl
--- /dev/null
+--- a/configure.in
++++ b/configure.in
+@@ -1191,8 +1191,9 @@ 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_MSG_CHECKING(for mmap that can map /dev/zero)
+- AC_TRY_RUN([
++ 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>
+@@ -1215,9 +1216,7 @@ if test "$ac_cv_func_mmap" = "yes" &&
+ return 3;
+ }
+ return 0;
+- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])
+-
+- AC_MSG_RESULT($ac_cv_file__dev_zero)
++ }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])])
+ fi
+
+ # Now we determine which one is our anonymous shmem preference.