From 4a2ed9001353a895ff84594cb34e9c42fd24edaa Mon Sep 17 00:00:00 2001 From: Matthew Macy Date: Fri, 1 Nov 2019 10:41:03 -0700 Subject: Wrap Linux module macros MODULE_VERSION is already defined on FreeBSD. Wrap all of the used MODULE_* macros for the sake of consistency and portability. Add a user space noop version to reduce the need for _KERNEL ifdefs. Reviewed-by: Brian Behlendorf Signed-off-by: Matt Macy Closes #9542 --- module/nvpair/nvpair.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/nvpair') diff --git a/module/nvpair/nvpair.c b/module/nvpair/nvpair.c index c5bd98ebd..dd8a9420d 100644 --- a/module/nvpair/nvpair.c +++ b/module/nvpair/nvpair.c @@ -32,6 +32,7 @@ #include #include #include +#include #if defined(_KERNEL) #include @@ -3601,11 +3602,12 @@ nvpair_fini(void) module_init(nvpair_init); module_exit(nvpair_fini); +#endif -MODULE_DESCRIPTION("Generic name/value pair implementation"); -MODULE_AUTHOR(ZFS_META_AUTHOR); -MODULE_LICENSE(ZFS_META_LICENSE); -MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +ZFS_MODULE_DESCRIPTION("Generic name/value pair implementation"); +ZFS_MODULE_AUTHOR(ZFS_META_AUTHOR); +ZFS_MODULE_LICENSE(ZFS_META_LICENSE); +ZFS_MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); EXPORT_SYMBOL(nv_alloc_init); EXPORT_SYMBOL(nv_alloc_reset); @@ -3720,5 +3722,3 @@ EXPORT_SYMBOL(nvpair_value_uint64_array); EXPORT_SYMBOL(nvpair_value_string_array); EXPORT_SYMBOL(nvpair_value_nvlist_array); EXPORT_SYMBOL(nvpair_value_hrtime); - -#endif -- cgit v1.2.3