diff options
Diffstat (limited to 'include/os/freebsd/spl/sys/kmem.h')
-rw-r--r-- | include/os/freebsd/spl/sys/kmem.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/os/freebsd/spl/sys/kmem.h b/include/os/freebsd/spl/sys/kmem.h index 28c65e74a250c..dc3b4f5d78772 100644 --- a/include/os/freebsd/spl/sys/kmem.h +++ b/include/os/freebsd/spl/sys/kmem.h @@ -29,6 +29,7 @@ #ifndef _OPENSOLARIS_SYS_KMEM_H_ #define _OPENSOLARIS_SYS_KMEM_H_ +#ifdef _KERNEL #include <sys/param.h> #include <sys/malloc.h> #include <sys/vmem.h> @@ -93,5 +94,14 @@ void *calloc(size_t n, size_t s); zfs_kmem_alloc((size), (kmflags) | M_ZERO) #define kmem_free(buf, size) zfs_kmem_free((buf), (size)) +#endif /* _KERNEL */ + +#ifdef _STANDALONE +/* + * At the moment, we just need it for the type. We redirect the alloc/free + * routines to the usual Free and Malloc in that environment. + */ +typedef int kmem_cache_t; +#endif /* _STANDALONE */ #endif /* _OPENSOLARIS_SYS_KMEM_H_ */ |