aboutsummaryrefslogtreecommitdiffstats
path: root/include/os/freebsd/spl/sys/ccompile.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/os/freebsd/spl/sys/ccompile.h')
-rw-r--r--include/os/freebsd/spl/sys/ccompile.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/os/freebsd/spl/sys/ccompile.h b/include/os/freebsd/spl/sys/ccompile.h
index bffe6d21e31d..cf1e0a8a6376 100644
--- a/include/os/freebsd/spl/sys/ccompile.h
+++ b/include/os/freebsd/spl/sys/ccompile.h
@@ -113,9 +113,9 @@ extern "C" {
#define __VPRINTFLIKE(__n) __sun_attr__((__VPRINTFLIKE__(__n)))
#define __KPRINTFLIKE(__n) __sun_attr__((__KPRINTFLIKE__(__n)))
#define __KVPRINTFLIKE(__n) __sun_attr__((__KVPRINTFLIKE__(__n)))
-#ifdef _KERNEL
+#if defined(_KERNEL) || defined(_STANDALONE)
#define __NORETURN __sun_attr__((__noreturn__))
-#endif
+#endif /* _KERNEL || _STANDALONE */
#define __CONST __sun_attr__((__const__))
#define __PURE __sun_attr__((__pure__))
@@ -174,7 +174,7 @@ typedef int enum_t;
#define __exit
#endif
-#ifdef _KERNEL
+#if defined(_KERNEL) || defined(_STANDALONE)
#define param_set_charp(a, b) (0)
#define ATTR_UID AT_UID
#define ATTR_GID AT_GID
@@ -183,9 +183,15 @@ typedef int enum_t;
#define ATTR_CTIME AT_CTIME
#define ATTR_MTIME AT_MTIME
#define ATTR_ATIME AT_ATIME
+#if defined(_STANDALONE)
+#define vmem_free kmem_free
+#define vmem_zalloc kmem_zalloc
+#define vmem_alloc kmem_zalloc
+#else
#define vmem_free zfs_kmem_free
#define vmem_zalloc(size, flags) zfs_kmem_alloc(size, flags | M_ZERO)
#define vmem_alloc zfs_kmem_alloc
+#endif
#define MUTEX_NOLOCKDEP 0
#define RW_NOLOCKDEP 0