aio backend is very broken on BSD. #idef out of the way to enable compilation of code. Signed-off-by: Boaz Harrosh <bharrosh at panasas.com> --- usr/bs_aio.h | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/usr/bs_aio.h b/usr/bs_aio.h index f62e99c..c028848 100644 --- a/usr/bs_aio.h +++ b/usr/bs_aio.h @@ -132,34 +132,58 @@ static inline void io_prep_pwrite(struct iocb *iocb, int fd, void const *buf, static inline int io_setup(unsigned nr_reqs, io_context_t *ctx) { +#ifndef __MAKE_TGT_ON_BSD__ return syscall(__NR_io_setup, nr_reqs, ctx); +#else + return -1; +#endif } static inline long io_destroy(io_context_t ctx) { +#ifndef __MAKE_TGT_ON_BSD__ return syscall(__NR_io_destroy, ctx); +#else + return -1; +#endif } static inline int io_submit(io_context_t ctx, long n, struct iocb **paiocb) { +#ifndef __MAKE_TGT_ON_BSD__ return syscall(__NR_io_submit, ctx, n, paiocb); +#else + return -1; +#endif } static inline long io_cancel(io_context_t ctx, struct iocb *aiocb, struct io_event *res) { +#ifndef __MAKE_TGT_ON_BSD__ return syscall(__NR_io_cancel, ctx, aiocb, res); +#else + return -1; +#endif } static inline long io_getevents(io_context_t ctx, long min_nr, long nr, struct io_event *events, struct timespec *tmo) { +#ifndef __MAKE_TGT_ON_BSD__ return syscall(__NR_io_getevents, ctx, min_nr, nr, events, tmo); +#else + return -1; +#endif } static inline int eventfd(int count) { +#ifndef __MAKE_TGT_ON_BSD__ return syscall(__NR_eventfd, count); +#else + return -1; +#endif } #endif -- 1.6.0.6 -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html |