lkml.org 
[lkml]   [2022]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] kmod: configure.ac: In _Noreturn check, include <stdlib.h> for exit
Date
Otherwise, an implicit functiona declaration is used, causing
a C99 compatibility issue.

Signed-off-by: Florian Weimer <fweimer@redhat.com>

---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

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])])
base-commit: 6c5f2f13689e6a4668f87171752d7818bed4b602

\
 
 \ /
  Last update: 2022-12-17 17:54    [W:0.035 / U:2.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site