Index: cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c =================================================================== --- cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c +++ cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c @@ -2398,7 +2398,7 @@ localtime_r(&time, &t) == NULL || strftime(propbuf, proplen, "%a %b %e %k:%M %Y", &t) == 0) - (void) snprintf(propbuf, proplen, "%llu", val); + (void) snprintf(propbuf, proplen, "%"PRIu64, val); } break; @@ -2964,7 +2964,7 @@ return (err); if (literal) { - (void) snprintf(propbuf, proplen, "%llu", propvalue); + (void) snprintf(propbuf, proplen, "%"PRIu64, propvalue); } else if (propvalue == 0 && (type == ZFS_PROP_USERQUOTA || type == ZFS_PROP_GROUPQUOTA)) { (void) strlcpy(propbuf, "none", proplen); @@ -3021,7 +3021,7 @@ return (err); if (literal) { - (void) snprintf(propbuf, proplen, "%llu", propvalue); + (void) snprintf(propbuf, proplen, "%"PRIu64, propvalue); } else { zfs_nicenum(propvalue, propbuf, proplen); } Index: cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c =================================================================== --- cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c +++ cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c @@ -120,7 +120,7 @@ (void) snprintf(di->errbuf, sizeof (di->errbuf), dgettext(TEXT_DOMAIN, "Unable to determine path or stats for " - "object %lld in %s"), obj, dsname); + "object %"PRIu64" in %s"), obj, dsname); return (-1); } } @@ -414,7 +414,7 @@ } else { (void) snprintf(di->errbuf, sizeof (di->errbuf), dgettext(TEXT_DOMAIN, - "next allocated object (> %lld) find failure"), + "next allocated object (> %"PRIu64") find failure"), zc.zc_obj); di->zerr = errno; break; Index: cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c =================================================================== --- cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c +++ cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c @@ -264,7 +264,7 @@ case ZPOOL_PROP_GUID: intval = zpool_get_prop_int(zhp, prop, &src); - (void) snprintf(buf, len, "%llu", intval); + (void) snprintf(buf, len, "%"PRIu64, intval); break; case ZPOOL_PROP_ALTROOT: @@ -363,7 +363,7 @@ } /* FALLTHROUGH */ default: - (void) snprintf(buf, len, "%llu", intval); + (void) snprintf(buf, len, "%"PRIu64, intval); } break; @@ -1459,14 +1459,14 @@ } if (loss > 120) { (void) printf(dgettext(TEXT_DOMAIN, - "%s approximately %lld "), + "%s approximately %ld "), dryrun ? "Would discard" : "Discarded", (loss + 30) / 60); (void) printf(dgettext(TEXT_DOMAIN, "minutes of transactions.\n")); } else if (loss > 0) { (void) printf(dgettext(TEXT_DOMAIN, - "%s approximately %lld "), + "%s approximately %"PRId64" "), dryrun ? "Would discard" : "Discarded", loss); (void) printf(dgettext(TEXT_DOMAIN, "seconds of transactions.\n")); @@ -1520,11 +1520,11 @@ if (loss > 120) { (void) printf(dgettext(TEXT_DOMAIN, - "Approximately %lld minutes of data\n" + "Approximately %ld minutes of data\n" "\tmust be discarded, irreversibly. "), (loss + 30) / 60); } else if (loss > 0) { (void) printf(dgettext(TEXT_DOMAIN, - "Approximately %lld seconds of data\n" + "Approximately %"PRId64" seconds of data\n" "\tmust be discarded, irreversibly. "), loss); } if (edata != 0 && edata != UINT64_MAX) { @@ -2521,7 +2521,7 @@ libzfs_handle_t *hdl = zhp->zpool_hdl; (void) snprintf(msg, sizeof (msg), - dgettext(TEXT_DOMAIN, "cannot fault %llu"), guid); + dgettext(TEXT_DOMAIN, "cannot fault %"PRIu64), guid); (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); zc.zc_guid = guid; @@ -2556,7 +2556,7 @@ libzfs_handle_t *hdl = zhp->zpool_hdl; (void) snprintf(msg, sizeof (msg), - dgettext(TEXT_DOMAIN, "cannot degrade %llu"), guid); + dgettext(TEXT_DOMAIN, "cannot degrade %"PRIu64), guid); (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); zc.zc_guid = guid; @@ -3211,7 +3211,7 @@ libzfs_handle_t *hdl = zhp->zpool_hdl; (void) snprintf(msg, sizeof (msg), - dgettext(TEXT_DOMAIN, "cannot clear errors for %llx"), + dgettext(TEXT_DOMAIN, "cannot clear errors for %"PRIu64), guid); (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); @@ -3808,7 +3808,7 @@ if (dsobj == 0) { /* special case for the MOS */ - (void) snprintf(pathname, len, ":<0x%llx>", obj); + (void) snprintf(pathname, len, ":<0x%"PRIu64">", obj); return; } @@ -3818,7 +3818,7 @@ if (ioctl(zhp->zpool_hdl->libzfs_fd, ZFS_IOC_DSOBJ_TO_DSNAME, &zc) != 0) { /* just write out a path of two object numbers */ - (void) snprintf(pathname, len, "<0x%llx>:<0x%llx>", + (void) snprintf(pathname, len, "<0x%"PRIu64">:<0x%"PRIu64">", dsobj, obj); return; } @@ -3840,7 +3840,7 @@ dsname, zc.zc_value); } } else { - (void) snprintf(pathname, len, "%s:<0x%llx>", dsname, obj); + (void) snprintf(pathname, len, "%s:<0x%"PRIu64">", dsname, obj); } free(mntpnt); } Index: cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c =================================================================== --- cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c +++ cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c @@ -587,13 +587,13 @@ u = " KMGTPE"[index]; if (index == 0) { - (void) snprintf(buf, buflen, "%llu", n); + (void) snprintf(buf, buflen, "%"PRIu64, n); } else if ((num & ((1ULL << 10 * index) - 1)) == 0) { /* * If this is an even multiple of the base, always display * without any decimal precision. */ - (void) snprintf(buf, buflen, "%llu%c", n, u); + (void) snprintf(buf, buflen, "%"PRIu64"%c", n, u); } else { /* * We want to choose a precision that reflects the best choice @@ -817,9 +817,9 @@ free((void *)(uintptr_t)zc->zc_nvlist_conf); free((void *)(uintptr_t)zc->zc_nvlist_src); free((void *)(uintptr_t)zc->zc_nvlist_dst); - zc->zc_nvlist_conf = NULL; - zc->zc_nvlist_src = NULL; - zc->zc_nvlist_dst = NULL; + zc->zc_nvlist_conf = (uint64_t)NULL; + zc->zc_nvlist_src = (uint64_t)NULL; + zc->zc_nvlist_dst = (uint64_t)NULL; } static int