From: Ammar Faizi <ammarfaizi2@gnuweeb.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: Ammar Faizi <ammarfaizi2@gnuweeb.org>,
Pavel Begunkov <asml.silence@gmail.com>,
"Fernanda Ma'rouf" <fernandafmr12@gnuweeb.org>,
Hao Xu <howeyxu@tencent.com>,
Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>,
io-uring Mailing List <io-uring@vger.kernel.org>,
GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>
Subject: [RFC PATCH v1 4/5] Avoid macro redefinition warnings
Date: Mon, 6 Jun 2022 13:12:08 +0700 [thread overview]
Message-ID: <20220606061209.335709-5-ammarfaizi2@gnuweeb.org> (raw)
In-Reply-To: <20220606061209.335709-1-ammarfaizi2@gnuweeb.org>
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 --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.
--
Ammar Faizi
next prev parent reply other threads:[~2022-06-06 6:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 6:12 [RFC PATCH v1 0/5] Ensure io_uring data structure consistentcy in liburing Ammar Faizi
2022-06-06 6:12 ` [RFC PATCH v1 1/5] lib: Don't indent in `#ifdef -> #define -> #endif` block Ammar Faizi
2022-06-06 6:12 ` [RFC PATCH v1 2/5] lib: Add `BUILD_BUG_ON()` macro Ammar Faizi
2022-06-06 6:12 ` [RFC PATCH v1 3/5] lib: Add `sizeof_field()` macro Ammar Faizi
2022-06-06 6:12 ` Ammar Faizi [this message]
2022-06-06 6:12 ` [RFC PATCH v1 5/5] Add io_uring data structure build assertion Ammar Faizi
2022-06-06 11:51 ` Pavel Begunkov
2022-06-06 8:03 ` [RFC PATCH v1 0/5] Ensure io_uring data structure consistentcy in liburing Hao Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220606061209.335709-5-ammarfaizi2@gnuweeb.org \
--to=ammarfaizi2@gnuweeb.org \
--cc=alviro.iskandar@gnuweeb.org \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=fernandafmr12@gnuweeb.org \
--cc=gwml@vger.gnuweeb.org \
--cc=howeyxu@tencent.com \
--cc=io-uring@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox