freeipmi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] configure.ac: Fix -Wimplicit-function-declaration for printf


From: Sam James
Subject: [PATCH 1/3] configure.ac: Fix -Wimplicit-function-declaration for printf
Date: Fri, 4 Nov 2022 02:12:08 +0000

Clang 16 makes these errors fatal by default:
```
error: call to undeclared library function 'printf' with type 'int (const char 
*, ...)'; ISO C99 and later do not support implicit function declarations 
[-Werror,-Wimplicit-function-declaration]
```

printf(3) is provided by <stdio.h>, not <stdlib.h>.

Signed-off-by: Sam James <sam@gentoo.org>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 7a94b958b..2b505c783 100644
--- a/configure.ac
+++ b/configure.ac
@@ -692,7 +692,7 @@ fi
 
 AM_CONDITIONAL(WITH_FREEIPMI_ARGP, test "$have_argp" = "no")
 
-AC_TRY_COMPILE([#include <stdlib.h>],
+AC_TRY_COMPILE([#include <stdio.h>],
                [printf("%s\n", __FUNCTION__);],
                [AC_DEFINE([HAVE_FUNCTION_MACRO], [1], [Define is you have 
__FUNCTION__])])
 
-- 
2.38.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]