diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c index fe1294ba1b74..4246ec0b0e6c 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c @@ -48,6 +48,7 @@ #include #include #include +#include int fzap_default_block_shift = 14; /* 16k blocksize */ @@ -907,7 +908,7 @@ zap_value_search(objset_t *os, uint64_t zapobj, uint64_t value, char *name) for (zap_cursor_init(&zc, os, zapobj); (err = zap_cursor_retrieve(&zc, za)) == 0; zap_cursor_advance(&zc)) { - if (za->za_first_integer == value) { + if (ZFS_DIRENT_OBJ(za->za_first_integer) == value) { (void) strcpy(name, za->za_name); break; } diff --git a/sys/contrib/opensolaris/uts/common/fs/zfs/zap.c b/sys/contrib/opensolaris/uts/common/fs/zfs/zap.c index fe1294ba1b74..4246ec0b0e6c 100644 --- a/sys/contrib/opensolaris/uts/common/fs/zfs/zap.c +++ b/sys/contrib/opensolaris/uts/common/fs/zfs/zap.c @@ -48,6 +48,7 @@ #include #include #include +#include int fzap_default_block_shift = 14; /* 16k blocksize */ @@ -907,7 +908,7 @@ zap_value_search(objset_t *os, uint64_t zapobj, uint64_t value, char *name) for (zap_cursor_init(&zc, os, zapobj); (err = zap_cursor_retrieve(&zc, za)) == 0; zap_cursor_advance(&zc)) { - if (za->za_first_integer == value) { + if (ZFS_DIRENT_OBJ(za->za_first_integer) == value) { (void) strcpy(name, za->za_name); break; }