From cef0a8357b3fef9b12f3922cf84e7c723a1c3b37 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sun, 20 Mar 2022 07:22:33 -0600 Subject: [PATCH] engines/null: update external engine compilation Everything needs to include config-host.h, and make sure that the C++ side uses the right type for the queue op. Fixes: https://github.com/axboe/fio/issues/1371 Signed-off-by: Jens Axboe --- engines/null.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/engines/null.c b/engines/null.c index 4cc0102b..409b2b82 100644 --- a/engines/null.c +++ b/engines/null.c @@ -6,7 +6,8 @@ * * It also can act as external C++ engine - compiled with: * - * g++ -O2 -g -shared -rdynamic -fPIC -o cpp_null null.c -DFIO_EXTERNAL_ENGINE + * g++ -O2 -g -shared -rdynamic -fPIC -o cpp_null null.c \ + * -i ../config-host.h -DFIO_EXTERNAL_ENGINE * * to test it execute: * @@ -201,7 +202,7 @@ struct NullData { return null_commit(td, impl_); } - int fio_null_queue(struct thread_data *td, struct io_u *io_u) + fio_q_status fio_null_queue(struct thread_data *td, struct io_u *io_u) { return null_queue(td, impl_, io_u); } @@ -233,7 +234,7 @@ static int fio_null_commit(struct thread_data *td) return NullData::get(td)->fio_null_commit(td); } -static int fio_null_queue(struct thread_data *td, struct io_u *io_u) +static fio_q_status fio_null_queue(struct thread_data *td, struct io_u *io_u) { return NullData::get(td)->fio_null_queue(td, io_u); } -- 2.25.1