[PATCH v3 1/4] build: require minimum c11 compiler
Tyler Retzlaff
roretzla at linux.microsoft.com
Wed Aug 2 07:13:36 CEST 2023
Update top level meson.build to require c_std=c11 and remove use of
-std=gnu99.
Signed-off-by: Tyler Retzlaff <roretzla at 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(-)
diff --git a/drivers/net/failsafe/meson.build b/drivers/net/failsafe/meson.build
index 6013e13..c1d3610 100644
--- a/drivers/net/failsafe/meson.build
+++ b/drivers/net/failsafe/meson.build
@@ -7,7 +7,6 @@ if is_windows
subdir_done()
endif
-cflags += '-std=gnu99'
cflags += '-D_DEFAULT_SOURCE'
cflags += '-D_XOPEN_SOURCE=700'
cflags += '-pedantic'
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index ef8f782..d4e2c13 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -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>
diff --git a/meson.build b/meson.build
index 39cb738..70b54f0 100644
--- a/meson.build
+++ b/meson.build
@@ -9,6 +9,7 @@ project('DPDK', 'c',
license: 'BSD',
default_options: [
'buildtype=release',
+ 'c_std=c11',
'default_library=static',
'warning_level=2',
],
--
1.8.3.1
More information about the dev
mailing list