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 <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #9542
This commit is contained in:
Matthew Macy
2019-11-01 10:41:03 -07:00
committed by Brian Behlendorf
parent bd4dde8ef7
commit 4a2ed90013
13 changed files with 119 additions and 46 deletions
+2 -6
View File
@@ -64,7 +64,7 @@
#include <sys/procfs_list.h>
#include <linux/dcache_compat.h>
#include <linux/utsname_compat.h>
#include <linux/mod_compat.h>
#include <sys/mod.h>
#include <sys/sysmacros.h>
#else /* _KERNEL */
@@ -106,6 +106,7 @@
#include <sys/resource.h>
#include <sys/byteorder.h>
#include <sys/list.h>
#include <sys/mod.h>
#include <sys/uio.h>
#include <sys/zfs_debug.h>
#include <sys/kstat.h>
@@ -206,11 +207,6 @@ typedef struct zfs_kernel_param {
#define ZFS_MODULE_PARAM_CALL(scope_prefix, name_prefix, name, setfunc, \
getfunc, perm, desc)
/*
* Exported symbols
*/
#define EXPORT_SYMBOL(x)
/*
* Threads.
*/