[glib: 1/2] build: Fix implicit declaration of function errors
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] build: Fix implicit declaration of function errors
- Date: Mon, 16 Aug 2021 17:19:11 +0000 (UTC)
commit 971310a92c561e36cd20af3713242310d8043fb3
Author: Ryan Schmidt <git ryandesign com>
Date: Sat Aug 14 05:20:11 2021 -0500
build: Fix implicit declaration of function errors
Include the correct system headers for each test that meson performs.
This allows system capabilities to be detected correctly even if
implicit declaration of functions is considered an error.
meson.build | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/meson.build b/meson.build
index 394bb9719..911422cca 100644
--- a/meson.build
+++ b/meson.build
@@ -962,6 +962,7 @@ else
vsnprintf_c99_test_code = '''
#include <stdio.h>
#include <stdarg.h>
+#include <stdlib.h>
int
doit(char * s, ...)
@@ -1011,6 +1012,7 @@ main(void)
snprintf_c99_test_code = '''
#include <stdio.h>
#include <stdarg.h>
+#include <stdlib.h>
int
doit()
@@ -1057,6 +1059,8 @@ main(void)
printf_unix98_test_code = '''
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
int
main (void)
@@ -2174,6 +2178,7 @@ cmdline_test_code = '''
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
static int
__getcmdline (void)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]