liburing: add extern "C" to liburing.h

Make header includable from C++ projects.

Signed-off-by: Kevin Vigor <kvigor@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Kevin Vigor
2019-05-06 15:41:31 -06:00
committed by Jens Axboe
parent a17aec8458
commit 40c6f8454b

View File

@@ -1,6 +1,10 @@
#ifndef LIB_URING_H #ifndef LIB_URING_H
#define LIB_URING_H #define LIB_URING_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/uio.h> #include <sys/uio.h>
#include <signal.h> #include <signal.h>
#include <inttypes.h> #include <inttypes.h>
@@ -171,4 +175,8 @@ static inline void io_uring_prep_nop(struct io_uring_sqe *sqe)
sqe->opcode = IORING_OP_NOP; sqe->opcode = IORING_OP_NOP;
} }
#ifdef __cplusplus
}
#endif
#endif #endif