[v4,1/4] build: require minimum c11 compiler

Message ID 1690954318-3126-2-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Rejected, archived
Delegated to: Thomas Monjalon
Headers
Series eal: update public API to use stdatomic atomics |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff Aug. 2, 2023, 5:31 a.m. UTC
  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(-)
  

Patch

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',
         ],