diff mbox series

[RFC,v1,4/5] Avoid macro redefinition warnings

Message ID 20220606061209.335709-5-ammarfaizi2@gnuweeb.org (mailing list archive)
State New
Headers show
Series Ensure io_uring data structure consistentcy in liburing | expand

Commit Message

Ammar Faizi June 6, 2022, 6:12 a.m. UTC
This is a prep patch. The next patch will cause macro redefinition
warnings if we don't have this patch.

Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
---
 src/queue.c    | 2 ++
 src/register.c | 2 ++
 src/setup.c    | 2 ++
 src/syscall.c  | 2 ++
 4 files changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/src/queue.c b/src/queue.c
index ce0ecf6..800ae0c 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -1,5 +1,7 @@ 
 /* SPDX-License-Identifier: MIT */
+#ifndef _POSIX_C_SOURCE
 #define _POSIX_C_SOURCE 200112L
+#endif
 
 #include "lib.h"
 #include "syscall.h"
diff --git a/src/register.c b/src/register.c
index 993c450..f19a720 100644
--- a/src/register.c
+++ b/src/register.c
@@ -1,5 +1,7 @@ 
 /* SPDX-License-Identifier: MIT */
+#ifndef _POSIX_C_SOURCE
 #define _POSIX_C_SOURCE 200112L
+#endif
 
 #include "lib.h"
 #include "syscall.h"
diff --git a/src/setup.c b/src/setup.c
index d2adc7f..e28560d 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -1,5 +1,7 @@ 
 /* SPDX-License-Identifier: MIT */
+#ifndef _DEFAULT_SOURCE
 #define _DEFAULT_SOURCE
+#endif
 
 #include "lib.h"
 #include "syscall.h"
diff --git a/src/syscall.c b/src/syscall.c
index 362f1f5..b10f8b0 100644
--- a/src/syscall.c
+++ b/src/syscall.c
@@ -1,5 +1,7 @@ 
 /* SPDX-License-Identifier: MIT */
+#ifndef _DEFAULT_SOURCE
 #define _DEFAULT_SOURCE
+#endif
 
 /*
  * Functions in this file require libc, only build them when we use libc.