]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
AC_FUNC_MALLOC: fix cross compilation to musl
authorAlyssa Ross <hi@alyssa.is>
Wed, 15 May 2024 11:49:08 +0000 (13:49 +0200)
committerZack Weinberg <zack@owlfolio.org>
Wed, 15 May 2024 14:57:14 +0000 (10:57 -0400)
This check returned yes for me on musl 1.2.3 on
aarch64-unknown-linux-musl.

lib/autoconf/functions.m4

index ca41de8b4d11d3cf977e0949478be913663dbea0..7b03ad6a0f18b02df18204bcf80f232d7ed39422 100644 (file)
@@ -984,7 +984,7 @@ AC_CACHE_CHECK([for GNU libc compatible malloc], ac_cv_func_malloc_0_nonnull,
               [ac_cv_func_malloc_0_nonnull=no],
               [case "$host_os" in # ((
                  # Guess yes on platforms where we know the result.
-                 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
+                 *-gnu* | *-musl* | freebsd* | netbsd* | openbsd* | bitrig* \
                  | hpux* | solaris* | cygwin* | mingw* | windows* | msys* )
                    ac_cv_func_malloc_0_nonnull=yes ;;
                  # If we don't know, assume the worst.