summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-12-17 17:52:34 +0100
committerLucas De Marchi <lucas.de.marchi@gmail.com>2022-12-26 09:33:47 -0800
commit035e6667d1ace2fd77ef36f5e5d93cd4b1e128a2 (patch)
tree38659b131a193ced8e2ca4d33b01755fef795668
parent6c5f2f13689e6a4668f87171752d7818bed4b602 (diff)
downloadkmod-035e6667d1ace2fd77ef36f5e5d93cd4b1e128a2.tar.gz
kmod: configure.ac: In _Noreturn check, include <stdlib.h> for exit
Otherwise, an implicit functiona declaration is used, causing a C99 compatibility issue. Signed-off-by: Florian Weimer <fweimer@redhat.com> Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 6989e93..12e0518 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,7 +68,8 @@ AC_COMPILE_IFELSE(
AC_MSG_CHECKING([whether _Noreturn is supported])
AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE([[_Noreturn int foo(void) { exit(0); }]])],
+ [AC_LANG_SOURCE([[#include <stdlib.h>
+ _Noreturn int foo(void) { exit(0); }]])],
[AC_DEFINE([HAVE_NORETURN], [1], [Define if _Noreturn is available])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])