public inbox for [email protected]
 help / color / mirror / Atom feed
From: Simon Zeni <[email protected]>
To: [email protected]
Cc: Simon Zeni <[email protected]>
Subject: [PATCH liburing] add C11 support
Date: Wed, 21 Oct 2020 11:42:16 -0400	[thread overview]
Message-ID: <[email protected]> (raw)

Signed-off-by: Simon Zeni <[email protected]>
---
 src/include/liburing/barrier.h | 8 ++++----
 src/queue.c                    | 2 ++
 src/register.c                 | 2 ++
 src/setup.c                    | 2 ++
 src/syscall.c                  | 2 ++
 5 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/include/liburing/barrier.h b/src/include/liburing/barrier.h
index a4a59fb..89ac682 100644
--- a/src/include/liburing/barrier.h
+++ b/src/include/liburing/barrier.h
@@ -56,17 +56,17 @@ static inline T io_uring_smp_load_acquire(const T *p)
 #include <stdatomic.h>
 
 #define IO_URING_WRITE_ONCE(var, val)				\
-	atomic_store_explicit((_Atomic typeof(var) *)&(var),	\
+	atomic_store_explicit((_Atomic __typeof__(var) *)&(var),	\
 			      (val), memory_order_relaxed)
 #define IO_URING_READ_ONCE(var)					\
-	atomic_load_explicit((_Atomic typeof(var) *)&(var),	\
+	atomic_load_explicit((_Atomic __typeof__(var) *)&(var),	\
 			     memory_order_relaxed)
 
 #define io_uring_smp_store_release(p, v)			\
-	atomic_store_explicit((_Atomic typeof(*(p)) *)(p), (v), \
+	atomic_store_explicit((_Atomic __typeof__(*(p)) *)(p), (v), \
 			      memory_order_release)
 #define io_uring_smp_load_acquire(p)				\
-	atomic_load_explicit((_Atomic typeof(*(p)) *)(p),	\
+	atomic_load_explicit((_Atomic __typeof__(*(p)) *)(p),	\
 			     memory_order_acquire)
 #endif
 
diff --git a/src/queue.c b/src/queue.c
index 24fde2d..86fa5eb 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -1,3 +1,5 @@
+#define _POSIX_C_SOURCE 200112L
+
 /* SPDX-License-Identifier: MIT */
 #include <sys/types.h>
 #include <sys/stat.h>
diff --git a/src/register.c b/src/register.c
index f3787c0..b9c657c 100644
--- a/src/register.c
+++ b/src/register.c
@@ -1,3 +1,5 @@
+#define _POSIX_C_SOURCE 200112L
+
 /* SPDX-License-Identifier: MIT */
 #include <sys/types.h>
 #include <sys/stat.h>
diff --git a/src/setup.c b/src/setup.c
index 8e14085..0538e27 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -1,3 +1,5 @@
+#define _DEFAULT_SOURCE
+
 /* SPDX-License-Identifier: MIT */
 #include <sys/types.h>
 #include <sys/stat.h>
diff --git a/src/syscall.c b/src/syscall.c
index 598b531..543aa77 100644
--- a/src/syscall.c
+++ b/src/syscall.c
@@ -1,3 +1,5 @@
+#define _DEFAULT_SOURCE
+
 /* SPDX-License-Identifier: MIT */
 /*
  * Will go away once libc support is there
-- 
2.29.0


             reply	other threads:[~2020-10-21 15:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21 15:42 Simon Zeni [this message]
2020-10-22  1:47 ` [PATCH liburing] add C11 support Jens Axboe

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    /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