[v2,1/4] build: require minimum c11 compiler
Checks
Commit Message
Update top level meson.build to require c_std=c11 and remove use of
-std=gnu99.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
drivers/net/failsafe/meson.build | 1 -
lib/eal/common/eal_common_errno.c | 1 +
meson.build | 1 +
3 files changed, 2 insertions(+), 1 deletion(-)
@@ -7,7 +7,6 @@ if is_windows
subdir_done()
endif
-cflags += '-std=gnu99'
cflags += '-D_DEFAULT_SOURCE'
cflags += '-D_XOPEN_SOURCE=700'
cflags += '-pedantic'
@@ -4,6 +4,7 @@
/* Use XSI-compliant portable version of strerror_r() */
#undef _GNU_SOURCE
+#define _POSIX_C_SOURCE 200112L
#include <stdio.h>
#include <string.h>
@@ -9,6 +9,7 @@ project('DPDK', 'c',
license: 'BSD',
default_options: [
'buildtype=release',
+ 'c_std=c11',
'default_library=static',
'warning_level=2',
],