Skip to contentSkip to conversation

uapi:io_uring.h: allow linux/time_types.h to be skipped

PATCH Applied Stefan Metzmacher 3 participants 4 messages Nov 16, 2022 – Dec 27, 2022 1 message not in the archive io_uring

lore
Share & tools
lore
#1 lore raw

PATCH v2 1/1 uapi:io_uring.h: allow linux/time_types.h to be skipped

In reply to a message not in the archive

include/uapi/linux/io_uring.h is synced 1:1 into liburing:src/include/liburing/io_uring.h.

liburing has a configure check to detect the need for linux/time_types.h. It can opt-out by defining UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H

---
 include/uapi/linux/io_uring.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/uapi/linux/io_uring.h +8 -0
index 551e75908f33..082020257f19 100644
@@ -10,7 +10,15 @@
 
 #include <linux/fs.h>
 #include <linux/types.h>
+/*
+ * this file is shared with liburing and that has to autodetect
+ * if linux/time_types.h is available or not, it can
+ * define UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H
+ * if linux/time_types.h is not available
+ */
+#ifndef UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H
 #include <linux/time_types.h>
+#endif
 
 #ifdef __cplusplus
 extern "C" {
Signature · 1 line
2.34.1
Reviewed-by on v2 1/1
#2 lore raw
Quoted 10 lines · Stefan Metzmacher
include/uapi/linux/io_uring.h +2 -0
index 551e75908f33..082020257f19 100644
@@ -10,7 +10,15 @@
 
  #include <linux/fs.h>
  #include <linux/types.h>
+/*
+ * this file is shared with liburing and that has to autodetect

include/uapi/linux/io_uring.h line 24

Quoted 10 lines
include/uapi/linux/io_uring.h +6 -0
+ * if linux/time_types.h is available or not, it can
+ * define UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H
+ * if linux/time_types.h is not available
+ */
+#ifndef UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H
  #include <linux/time_types.h>
+#endif
 
  #ifdef __cplusplus
  extern "C" {

I admit the v1 was a stupid mistake. Sorry for that. Now this change should not have any effect on the kernel code.

Only apps that use io_uring.h and put:

  #define UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H

before the #include will get the effect, which Stefan will do in liburing once this one gets accepted.

Signature · 1 line
Ammar Faizi
#3 lore raw
In reply to Stefan Metzmacher

Hi Jens,

any chance to get this merged?

metze

Am 16.11.22 um 21:25 schrieb Stefan Metzmacher:

Quoted 38 lines

include/uapi/linux/io_uring.h is synced 1:1 into liburing:src/include/liburing/io_uring.h.

liburing has a configure check to detect the need for linux/time_types.h. It can opt-out by defining UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H

---
  include/uapi/linux/io_uring.h | 8 ++++++++
  1 file changed, 8 insertions(+)
include/uapi/linux/io_uring.h +8 -0
index 551e75908f33..082020257f19 100644
@@ -10,7 +10,15 @@
 
  #include <linux/fs.h>
  #include <linux/types.h>
+/*
+ * this file is shared with liburing and that has to autodetect
+ * if linux/time_types.h is available or not, it can
+ * define UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H
+ * if linux/time_types.h is not available
+ */
+#ifndef UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H
  #include <linux/time_types.h>
+#endif
 
  #ifdef __cplusplus
  extern "C" {
maintainer Applied
#4 lore raw
In reply to Stefan Metzmacher
Quoted 8 lines · Stefan Metzmacher

include/uapi/linux/io_uring.h is synced 1:1 into
liburing:src/include/liburing/io_uring.h.

liburing has a configure check to detect the need for linux/time_types.h. It can opt-out by defining UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H

[...]

Applied, thanks!

[1/1] uapi:io_uring.h: allow linux/time_types.h to be skipped

      commit: 9eb803402a2a83400c6c6afd900e3b7c87c06816

Best regards,

Signature · 1 line
Jens Axboe