diff options
author | Brian Behlendorf <[email protected]> | 2010-09-10 09:36:39 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-09-10 09:36:39 -0700 |
commit | e37e1d3040edac06a0d4380f7eaaa7a69892c7c6 (patch) | |
tree | 28d8c4492320194a0a542689c0e8dcc1596b9b6c /include/sys/zfs_context.h | |
parent | 8ec8000f95d60daa51f670fd46930a2cec6accae (diff) |
Use linux __KERNEL__ define
Previously the project contained who zfs_context.h files,
one for user space builds and one for kernel space builds.
It was the responsibility of the source including the file
to ensure the right one was included based on the order of
the include paths.
This was the way it was done in OpenSolaris but for our
purposes I felt it was overly obscure. The user and kernel
zfs_context.h files have been combined in to a single file
and a #define determines if you get the user or kernel
context.
The issue here was that I used the _KERNEL macro which is
defined as part of the spl which will only be defined for
most builds after you include the right zfs_context. It is
safer to use the __KERNEL__ macro which is automatically
defined as part of the kernel build process and passed as
a command line compiler option. It will always be defined
if your building in the kernel and never for user space.
Diffstat (limited to 'include/sys/zfs_context.h')
-rw-r--r-- | include/sys/zfs_context.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index 115bf9759..c44990351 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -26,7 +26,7 @@ #ifndef _SYS_ZFS_CONTEXT_H #define _SYS_ZFS_CONTEXT_H -#ifdef _KERNEL +#ifdef __KERNEL__ #include <sys/note.h> #include <sys/types.h> |