summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-02-28 02:31:50 +0000
committerSam James <sam@gentoo.org>2023-02-28 02:31:50 +0000
commit453f893e3c38c209ae9dff47bca74ccb33a5bd34 (patch)
treeb79082bcd53ecf2d02e45b4e492471dceaecf03e
parentc15cef7274866d2a750e9207305ea1ae1bf11365 (diff)
downloadaccountsservice-453f893e3c38c209ae9dff47bca74ccb33a5bd34.tar.gz
meson.build: fix -Wimplicit-function-declaration in configure tests for printf
<stdio.h> needs to be included for printf. Newer compilers like Clang 16 make implicit function declarations an error by default which can cause misleading or incorrect configure test results. Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--meson.build2
1 files changed, 2 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 67e68c9..4a509e7 100644
--- a/meson.build
+++ b/meson.build
@@ -79,6 +79,7 @@ endforeach
if cc.has_header_symbol('utmpx.h', 'WTMPX_FILENAME', prefix: '#define _GNU_SOURCE')
code = '''#define _GNU_SOURCE
+ #include <stdio.h>
#include <utmpx.h>
int main (int argc, char **argv) {
printf ("%s\n", WTMPX_FILENAME);
@@ -91,6 +92,7 @@ if cc.has_header_symbol('utmpx.h', 'WTMPX_FILENAME', prefix: '#define _GNU_SOURC
config_h.set('PATH_WTMP', 'WTMPX_FILENAME')
elif cc.has_header_symbol('paths.h', '_PATH_WTMPX')
code = '''#include <paths.h>
+ #include <stdio.h>
int main (int argc, char **argv) {
printf ("%s\n", _PATH_WTMPX);
return 0;