]> granicus.if.org Git - zfs/blob - config/kernel-bio-end-io-t-args.m4
Linux 4.3 compat: bio_end_io_t / BIO_UPTODATE
[zfs] / config / kernel-bio-end-io-t-args.m4
1 dnl #
2 dnl # 4.3 API change
3 dnl # Error argument dropped from bio_endio in favor of newly introduced
4 dnl # bio->bi_error. This also replaces bio->bi_flags value BIO_UPTODATE.
5 dnl # Introduced by torvalds/linux@4246a0b63bd8f56a1469b12eafeb875b1041a451
6 dnl # ("block: add a bi_error field to struct bio").
7 dnl #
8 AC_DEFUN([ZFS_AC_KERNEL_BIO_END_IO_T_ARGS], [
9         AC_MSG_CHECKING([whether bio_end_io_t wants 1 arg])
10         ZFS_LINUX_TRY_COMPILE([
11                 #include <linux/bio.h>
12
13                 void wanted_end_io(struct bio *bio) { return; }
14
15                 bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
16         ],[
17         ],[
18                 AC_MSG_RESULT(yes)
19                 AC_DEFINE(HAVE_1ARG_BIO_END_IO_T, 1,
20                           [bio_end_io_t wants 1 arg])
21         ],[
22                 AC_MSG_RESULT(no)
23         ])
24 ])