On Tue, 2022-06-28 at 23:10 +0700, Ammar Faizi wrote: > On 6/28/22 10:04 PM, Dylan Yudaken wrote: > > copy from include/uapi/linux/io_uring.h > > > > Signed-off-by: Dylan Yudaken <dylany@xxxxxx> > > --- > > src/include/liburing/io_uring.h | 53 ++++++++++++++++++++++++---- > > ----- > > 1 file changed, 39 insertions(+), 14 deletions(-) > > > > diff --git a/src/include/liburing/io_uring.h > > b/src/include/liburing/io_uring.h > > index 2f391c9..1e5bdb3 100644 > > --- a/src/include/liburing/io_uring.h > > +++ b/src/include/liburing/io_uring.h > > @@ -10,10 +10,7 @@ > > > > #include <linux/fs.h> > > #include <linux/types.h> > > - > > -#ifdef __cplusplus > > -extern "C" { > > -#endif > > Dylan, > > That `extern "C"` thing is for C++, we shouldn't omit it. > > Or better add that to the kernel tree as well, it won't break > the kernel because we have a __cplusplus guard here. > > Jens what do you think? > > Just for reference, that line is introduced in commit: > > commit 3d74c677c45eccf36b92f7ad4b3317adc1ed06bb > Author: Bart Van Assche <bvanassche@xxxxxxx> > Date: Sun Jun 28 12:58:19 2020 -0700 > > Make the liburing header files again compatible with C++ > > Include <atomic> instead of <stdatomic.h> if built with a C++ > compiler. > > Fixes: b9c0bf79aa87 ("src/include/liburing/barrier.h: Use C11 > atomics") > Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> > Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> > > src/include/liburing.h | 8 ++++---- > src/include/liburing/barrier.h | 37 > +++++++++++++++++++++++++++++++++++-- > src/include/liburing/io_uring.h | 8 ++++++++ > 3 files changed, 47 insertions(+), 6 deletions(-) > > Adding the author to the CC list. > Yeah this makes sense. I think I just assumed the file was a manual copy of the latest kernel one which it clearly is not. I'll fix it up in v2