diff --git a/zfs/lib/libzpool/zfs_fm.c b/zfs/lib/libzpool/zfs_fm.c index 236d69e7e6..bd06e37d1a 100644 --- a/zfs/lib/libzpool/zfs_fm.c +++ b/zfs/lib/libzpool/zfs_fm.c @@ -92,7 +92,7 @@ void zfs_ereport_post(const char *subclass, spa_t *spa, vdev_t *vd, zio_t *zio, uint64_t stateoroffset, uint64_t size) { -#ifdef _KERNEL +#if defined(_KERNEL) && defined(HAVE_FM) nvlist_t *ereport, *detector; uint64_t ena; char class[64]; @@ -315,7 +315,7 @@ zfs_ereport_post(const char *subclass, spa_t *spa, vdev_t *vd, zio_t *zio, static void zfs_post_common(spa_t *spa, vdev_t *vd, const char *name) { -#ifdef _KERNEL +#if defined(_KERNEL) && defined(HAVE_FM) nvlist_t *resource; char class[64];