diff --git a/include/os/linux/spl/sys/errno.h b/include/os/linux/spl/sys/errno.h index 6015b1a3e2..f6d9212a61 100644 --- a/include/os/linux/spl/sys/errno.h +++ b/include/os/linux/spl/sys/errno.h @@ -44,4 +44,14 @@ #define ENOTSUP EOPNOTSUPP +/* + * We'll take the unused errnos, 'EBADE' and 'EBADR' (from the Convergent + * graveyard) to indicate checksum errors and fragmentation. + */ +#define ECKSUM EBADE +#define EFRAGS EBADR + +/* Similar for ENOACTIVE */ +#define ENOTACTIVE ENOANO + #endif /* _SYS_ERRNO_H */ diff --git a/include/sys/zio.h b/include/sys/zio.h index bf441ff8d5..23a4a6ea93 100644 --- a/include/sys/zio.h +++ b/include/sys/zio.h @@ -265,16 +265,6 @@ enum zio_wait_type { ZIO_WAIT_TYPES }; -/* - * We'll take the unused errnos, 'EBADE' and 'EBADR' (from the Convergent - * graveyard) to indicate checksum errors and fragmentation. - */ -#define ECKSUM EBADE -#define EFRAGS EBADR - -/* Similar for ENOACTIVE */ -#define ENOTACTIVE ENOANO - typedef void zio_done_func_t(zio_t *zio); extern int zio_dva_throttle_enabled; diff --git a/lib/libspl/include/os/linux/sys/Makefile.am b/lib/libspl/include/os/linux/sys/Makefile.am index c11732cc1f..6b170fa8c8 100644 --- a/lib/libspl/include/os/linux/sys/Makefile.am +++ b/lib/libspl/include/os/linux/sys/Makefile.am @@ -1,6 +1,7 @@ libspldir = $(includedir)/libspl/sys libspl_HEADERS = \ $(top_srcdir)/lib/libspl/include/os/linux/sys/byteorder.h \ + $(top_srcdir)/lib/libspl/include/os/linux/sys/errno.h \ $(top_srcdir)/lib/libspl/include/os/linux/sys/file.h \ $(top_srcdir)/lib/libspl/include/os/linux/sys/mnttab.h \ $(top_srcdir)/lib/libspl/include/os/linux/sys/mount.h \ diff --git a/lib/libspl/include/sys/errno.h b/lib/libspl/include/os/linux/sys/errno.h similarity index 84% rename from lib/libspl/include/sys/errno.h rename to lib/libspl/include/os/linux/sys/errno.h index e8bfbe3538..30d20ab895 100644 --- a/lib/libspl/include/sys/errno.h +++ b/lib/libspl/include/os/linux/sys/errno.h @@ -31,5 +31,16 @@ */ #ifndef _LIBSPL_SYS_ERRNO_H #define _LIBSPL_SYS_ERRNO_H + #include +/* + * We'll take the unused errnos, 'EBADE' and 'EBADR' (from the Convergent + * graveyard) to indicate checksum errors and fragmentation. + */ +#define ECKSUM EBADE +#define EFRAGS EBADR + +/* Similar for ENOACTIVE */ +#define ENOTACTIVE ENOANO + #endif /* _LIBSPL_SYS_ERRNO_H */ diff --git a/lib/libspl/include/sys/Makefile.am b/lib/libspl/include/sys/Makefile.am index 54aece1299..6855a39d12 100644 --- a/lib/libspl/include/sys/Makefile.am +++ b/lib/libspl/include/sys/Makefile.am @@ -11,7 +11,6 @@ libspl_HEADERS = \ $(top_srcdir)/lib/libspl/include/sys/debug.h \ $(top_srcdir)/lib/libspl/include/sys/dkio.h \ $(top_srcdir)/lib/libspl/include/sys/dklabel.h \ - $(top_srcdir)/lib/libspl/include/sys/errno.h \ $(top_srcdir)/lib/libspl/include/sys/feature_tests.h \ $(top_srcdir)/lib/libspl/include/sys/int_limits.h \ $(top_srcdir)/lib/libspl/include/sys/int_types.h \