aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zpool
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/zpool')
-rw-r--r--cmd/zpool/zpool_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index bad4e2a4f..3b8157392 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -1533,7 +1533,9 @@ do_import(nvlist_t *config, const char *newname, const char *mntopts,
if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_HOSTID,
&hostid) == 0) {
- if ((unsigned long)hostid != gethostid()) {
+ unsigned long system_hostid = gethostid() & 0xffffffff;
+
+ if ((unsigned long)hostid != system_hostid) {
char *hostname;
uint64_t timestamp;
time_t t;