diff -r e15391c2e6f1 tools/blktap2/drivers/tapdisk-queue.c --- a/tools/blktap2/drivers/tapdisk-queue.c Thu Feb 04 12:13:30 2010 +0100 +++ b/tools/blktap2/drivers/tapdisk-queue.c Thu Feb 04 12:38:09 2010 +0100 @@ -284,11 +284,14 @@ struct lio { #define LIO_FLAG_EVENTFD (1<<0) +#if defined(__linux__) +/* XXX abstraction violation: move this into a linux specific file */ static int tapdisk_lio_check_resfd(void) { return tapdisk_linux_version() >= KERNEL_VERSION(2, 6, 22); } +#endif static void tapdisk_lio_destroy_aio(struct tqueue *queue) @@ -372,8 +375,11 @@ tapdisk_lio_setup_aio(struct tqueue *que * if not, fall back to the poll fd patch. */ +#if defined(__linux__) +/* XXX abstraction violation: move this into a linux specific file */ err = !tapdisk_lio_check_resfd(); if (!err) +#endif err = __lio_setup_aio_eventfd(queue, qlen); if (err) err = __lio_setup_aio_poll(queue, qlen);