From 05b4b092dc5c111672b4cbd7c4cd728f058e9f8c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 22 Dec 2008 13:31:23 -0800 Subject: [PATCH 1/3] Only required for ZPL builds --- module/zfs/rrwlock.c | 4 ++++ 1 file changed, 4 insertions(+) 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 */ From b17c1f4123646c2e628b1aabb1c8c4f748e44174 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 22 Dec 2008 13:32:19 -0800 Subject: [PATCH 2/3] Don't make this fatal for userspace --- module/zfs/vdev_disk.c | 2 -- 1 file changed, 2 deletions(-) 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 */ From 46badfb03b3c328cbcaf734199c1cfe43ea1320f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 22 Dec 2008 13:33:06 -0800 Subject: [PATCH 3/3] Only allow this for the kernel --- module/zfs/spa_boot.c | 4 ++++ 1 file changed, 4 insertions(+) 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 */