$NetBSD: patch-configure,v 1.5 2024/10/14 13:04:00 adam Exp $ Skip compiler detection magic. Avoid choosing aligned_alloc() when it's not present, such as CentOS 6 with lang/gcc7 and older Solaris releases. --- configure.orig 2024-10-13 23:43:50.000000000 +0000 +++ configure @@ -647,8 +647,6 @@ else fi done fi # icc -test -z "$cc_vendor" && die "compiler not found" -test "$cc_fail" = "yes" && die "unsupported compiler version" log_start "compiler working with default options" if ! cc_check_cflag; then @@ -758,6 +756,16 @@ elif test "$OPT_OPENSSL" = "auto" || tes finish_check "$ALLOW_RUNTIME_LINKING" fi +start_check "libc provides aligned_alloc" +HAS_STDC_ALIGNED_ALLOC=no +if cc_check_statement "stdlib.h" 'aligned_alloc(256, 1024);' "-Werror -Wno-unused-result"; then + HAS_STDC_ALIGNED_ALLOC=yes +fi +if test "$HAS_STDC_ALIGNED_ALLOC" = "no"; then + BUILD_EXTRA_CFLAGS=$(join_params $BUILD_EXTRA_CFLAGS -DNO_STDC_ALIGNED_ALLOC) +fi +finish_check "$HAS_STDC_ALIGNED_ALLOC" + SHARED_VSCRIPT= if ! darwin; then start_check "linker support for --version-script"