aboutsummaryrefslogtreecommitdiffstats
path: root/include/os/freebsd/spl/sys/ccompile.h
diff options
context:
space:
mode:
authorMatt Macy <mmacy@FreeBSD.org>2020-10-17 00:05:34 +0000
committerMatt Macy <mmacy@FreeBSD.org>2020-10-17 00:05:34 +0000
commit0be360124f8f108f73365e31448e7550f877f3ac (patch)
tree78557e980720fdcfd76497e6630c29ce1688559c /include/os/freebsd/spl/sys/ccompile.h
parente2228bd99047bb6a0cef0da931147b1f28f155c2 (diff)
downloadsrc-vendor/openzfs.tar.gz
src-vendor/openzfs.zip
Update OpenZFS to 2.0.0-rc3-gbd565fvendor/openzfs/2.0.0-rc3-gfc5966vendor/openzfs
Notes
Notes: svn path=/vendor-sys/openzfs/dist/; revision=366774 svn path=/vendor-sys/openzfs/2.0.0-rc3-gfc5966/; revision=366775; tag=vendor/openzfs/2.0.0-rc3-gfc5966
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