From aaed7c408c0bd72c6f9437793a98542972f0a8fd Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Fri, 14 Nov 2014 10:21:53 -0800 Subject: [PATCH] Explicitly include SPL compat headers Inclusion of SPL compatibility headers was moved out of the public header sys/types.h to avoid conflicts with external packages. Include a few compatiblity headers explicitly to cope with that change. Also, sort some linux-specific inclusions alphabetically. Signed-off-by: Ned Bass Signed-off-by: Brian Behlendorf Closes #2898 --- include/sys/zpl.h | 9 +++++---- module/avl/avl.c | 1 + module/nvpair/nvpair.c | 1 + module/unicode/u8_textprep.c | 1 + module/zcommon/zfs_prop.c | 1 + module/zfs/arc.c | 1 + module/zfs/zfs_ioctl.c | 1 + module/zpios/pios.c | 1 + 8 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/sys/zpl.h b/include/sys/zpl.h index 2d82d1ada..3fc5d979f 100644 --- a/include/sys/zpl.h +++ b/include/sys/zpl.h @@ -26,14 +26,15 @@ #define _SYS_ZPL_H #include -#include -#include +#include #include #include -#include #include +#include #include -#include +#include +#include +#include /* zpl_inode.c */ extern void zpl_vap_init(vattr_t *vap, struct inode *dir, diff --git a/module/avl/avl.c b/module/avl/avl.c index b598cc918..5c2b722e6 100644 --- a/module/avl/avl.c +++ b/module/avl/avl.c @@ -1030,6 +1030,7 @@ done: } #if defined(_KERNEL) && defined(HAVE_SPL) +#include static int avl_init(void) { return 0; } static int avl_fini(void) { return 0; } diff --git a/module/nvpair/nvpair.c b/module/nvpair/nvpair.c index f5c31663a..9fd486bca 100644 --- a/module/nvpair/nvpair.c +++ b/module/nvpair/nvpair.c @@ -3293,6 +3293,7 @@ nvs_xdr(nvstream_t *nvs, nvlist_t *nvl, char *buf, size_t *buflen) } #if defined(_KERNEL) && defined(HAVE_SPL) +#include static int nvpair_init(void) { return 0; } static int nvpair_fini(void) { return 0; } diff --git a/module/unicode/u8_textprep.c b/module/unicode/u8_textprep.c index 60e586d25..f5ab77951 100644 --- a/module/unicode/u8_textprep.c +++ b/module/unicode/u8_textprep.c @@ -2133,6 +2133,7 @@ u8_textprep_str(char *inarray, size_t *inlen, char *outarray, size_t *outlen, } #if defined(_KERNEL) && defined(HAVE_SPL) +#include static int unicode_init(void) { return 0; } static int unicode_fini(void) { return 0; } diff --git a/module/zcommon/zfs_prop.c b/module/zcommon/zfs_prop.c index e60c4f7d4..18b5f951e 100644 --- a/module/zcommon/zfs_prop.c +++ b/module/zcommon/zfs_prop.c @@ -678,6 +678,7 @@ zfs_prop_align_right(zfs_prop_t prop) #endif #if defined(_KERNEL) && defined(HAVE_SPL) +#include static int zcommon_init(void) { return 0; } static int zcommon_fini(void) { return 0; } diff --git a/module/zfs/arc.c b/module/zfs/arc.c index fd593a13e..5b90d9a9f 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -140,6 +140,7 @@ #include #include #include +#include #endif #include #include diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index 9396d6caa..5fb407900 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -186,6 +186,7 @@ #include #include +#include #include "zfs_namecheck.h" #include "zfs_prop.h" diff --git a/module/zpios/pios.c b/module/zpios/pios.c index 860edea7b..fb15046be 100644 --- a/module/zpios/pios.c +++ b/module/zpios/pios.c @@ -36,6 +36,7 @@ #include #include #include +#include #include "zpios-internal.h"