$NetBSD: patch-configure,v 1.6 2025/05/14 05:22:59 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 2025-05-13 20:58:34.000000000 +0000 +++ configure @@ -655,8 +655,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 @@ -788,6 +786,16 @@ if test "$OPT_SHANI" = "auto"; then finish_check "$HAS_X86_SSE4_SHANI" 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"