]> git.alsa-project.org Git - alsa-lib.git/commitdiff
utils/alsa.m4: include <stdlib.h> for exit()
authorSam James <sam@gentoo.org>
Sun, 30 Oct 2022 18:06:37 +0000 (18:06 +0000)
committerJaroslav Kysela <perex@perex.cz>
Sun, 29 Jan 2023 17:51:54 +0000 (18:51 +0100)
Clang 16 makes -Wimplicit-function-declaration an error by default
and it's easier to just explicitly include <stdlib.h> rather
than hope the ALSA headers always have it.

Fixes: https://github.com/alsa-project/alsa-lib/pull/278
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
utils/alsa.m4

index 40e50a19dd04aaa5c71a60e48569b5d66b9b9c14..461d8d5ef9c1d1fe2aae9d2d12f7f2e9cc2835b1 100644 (file)
@@ -85,6 +85,7 @@ AC_LANG_PUSH([C])
 AC_MSG_CHECKING([for libasound headers version >= $alsa_min_major_version.$alsa_min_minor_version.$alsa_min_micro_version ($min_alsa_version)])
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <alsa/asoundlib.h>
+#include <stdlib.h>
 ]], [[
 /* ensure backward compatibility */
 #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
@@ -130,6 +131,7 @@ AC_MSG_CHECKING([for libatopology (sound headers version > 1.1.9)])
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <alsa/asoundlib.h>
 #include <alsa/topology.h>
+#include <stdlib.h>
 ]], [[
 /* ensure backward compatibility */
 #if !defined(SND_LIB_VERSION)