diff --git a/module/zfs/rrwlock.c b/module/zfs/rrwlock.c index 710685dbc7..7bce5dd8d7 100644 --- a/module/zfs/rrwlock.c +++ b/module/zfs/rrwlock.c @@ -23,6 +23,8 @@ * Use is subject to license terms. */ +#ifdef HAVE_ZPL + #pragma ident "%Z%%M% %I% %E% SMI" #include @@ -247,3 +249,5 @@ rrw_held(rrwlock_t *rrl, krw_t rw) return (held); } + +#endif /* HAVE_ZPL */ diff --git a/module/zfs/spa_boot.c b/module/zfs/spa_boot.c index 49e9e50193..920feecb24 100644 --- a/module/zfs/spa_boot.c +++ b/module/zfs/spa_boot.c @@ -24,6 +24,8 @@ * Use is subject to license terms. */ +#ifdef _KERNEL + #pragma ident "%Z%%M% %I% %E% SMI" #include @@ -45,3 +47,5 @@ spa_free_bootprop(char *value) { ddi_prop_free(value); } + +#endif /* _KERNEL */ diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c index 4c241ec212..19cef7339f 100644 --- a/module/zfs/vdev_disk.c +++ b/module/zfs/vdev_disk.c @@ -656,6 +656,4 @@ vdev_ops_t vdev_disk_ops = { B_TRUE /* leaf vdev */ }; -#else -#error "vdev_disk.c is only required for an in-kernel builds" #endif /* _KERNEL */