diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c index b9cc3bfc927..220cc015a36 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c @@ -4354,6 +4354,7 @@ arc_reclaim_needed(void) extern kmem_cache_t *zio_buf_cache[]; extern kmem_cache_t *zio_data_buf_cache[]; extern kmem_cache_t *range_seg_cache; +extern kmem_cache_t *abd_chunk_cache; static __noinline void arc_kmem_reap_now(void) @@ -4361,7 +4362,6 @@ arc_kmem_reap_now(void) size_t i; kmem_cache_t *prev_cache = NULL; kmem_cache_t *prev_data_cache = NULL; - extern kmem_cache_t *abd_chunk_cache; DTRACE_PROBE(arc__kmem_reap_start); #ifdef _KERNEL diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c index 9974837fc51..04bc90ca3e8 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c @@ -899,7 +899,7 @@ vdev_label_write_pad2(vdev_t *vd, const char *buf, size_t size) pad2 = abd_alloc_for_io(VDEV_PAD_SIZE, B_TRUE); abd_zero(pad2, VDEV_PAD_SIZE); - abd_copy_from_buf(pad2, (void *)buf, size); + abd_copy_from_buf(pad2, __DECONST(void *, buf), size); retry: zio = zio_root(spa, NULL, NULL, flags);