[stgt] [PATCH 11/14] tgt: bs_aio Mostlly not supported under BSD

Or Gerlitz ogerlitz at Voltaire.com
Tue Feb 24 09:48:34 CET 2009


Boaz Harrosh wrote:
> aio backend is very broken on BSD. #idef out of the way
> to enable compilation of code.

> --- 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

If there's no other alternative, you may want to add header that defines all the NR_io_xxx calls to something that compiles under bsd - instead of putting ifdef around each of them here.

Or.
--
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



More information about the stgt mailing list