X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Ffio-engine-posixaio.c;h=401cd866ba549ee193098f3af54998c6e6aef2fd;hp=2d0fd3114b6469729997721643f8d66e3826451f;hb=34cfcdafa994a0a75120e498c51eda08bde5df72;hpb=c06aa240c904becbafb8457ed3b828cf0d38a180 diff --git a/engines/fio-engine-posixaio.c b/engines/fio-engine-posixaio.c index 2d0fd311..401cd866 100644 --- a/engines/fio-engine-posixaio.c +++ b/engines/fio-engine-posixaio.c @@ -10,6 +10,8 @@ #include "fio.h" #include "os.h" +#ifdef FIO_HAVE_POSIXAIO + struct posixaio_data { struct io_u **aio_events; }; @@ -186,3 +188,24 @@ struct ioengine_ops ioengine = { .event = fio_posixaio_event, .cleanup = fio_posixaio_cleanup, }; + +#else /* FIO_HAVE_POSIXAIO */ + +/* + * When we have a proper configure system in place, we simply wont build + * and install this io engine. For now install a crippled version that + * just complains and fails to load. + */ +static int fio_posixaio_init(struct thread_data fio_unused *td) +{ + fprintf(stderr, "fio: posixaio not available\n"); + return 1; +} + +struct ioengine_ops ioengine = { + .name = "posixaio", + .version = FIO_IOOPS_VERSION, + .init = fio_posixaio_init, +}; + +#endif