APR (ab)uses AC_TRY_RUN to determine if: * We have /dev/zero * We can mmap /dev/zero The APR ebuild sets ac_cv_file__dev_zero=yes when cross compiling to fill in an answer for the first question, but the configure script immediately defeats that when answering the second. AC_TRY_FUN takes four arguments: the test, and what happens on success, failure, and cross-compiling. The APR script uses this as a "gate" to clear ac_cv_file__dev_zero when /dev/zero exists but it turns out not to be useable. They take a pessimistic approach: if you can't "prove" it is mmap-able, clear the flag. This patch changes that to leave the flag alone while cross compiling; just assume /dev/zero is mmap-able. It relies on ac_cv_file__dev_zero to be correctly set for the target. The fourth parameter is changed to [:] and not [] because [] engages autoconf's default cross-compiling behavior, which raises an error. Signed-off-by: Alexandra Parker --- a/configure.in 2022-01-09 00:31:05.552582255 -0800 +++ b/configure.in 2022-01-09 00:31:19.824582533 -0800 @@ -1203,7 +1203,7 @@ return 3; } return 0; - }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no]) + }], [], [ac_cv_file__dev_zero=no], [:]) AC_MSG_RESULT($ac_cv_file__dev_zero) fi