--- nfs-utils-2.4.2/support/nfs/cacheio.c.old 2019-11-13 17:09:41.000000000 +0000 +++ nfs-utils-2.4.2/support/nfs/cacheio.c 2020-01-24 03:32:30.296395221 +0000 @@ -26,6 +26,7 @@ #include <fcntl.h> #include <time.h> #include <errno.h> +#include <inttypes.h> extern struct state_paths etab; @@ -234,7 +235,7 @@ stb.st_mtime > now) stb.st_mtime = time(0); - sprintf(stime, "%ld\n", stb.st_mtime); + sprintf(stime, "%"PRId64"\n", stb.st_mtime); for (c=0; cachelist[c]; c++) { int fd; sprintf(path, "/proc/net/rpc/%s/flush", cachelist[c]); --- nfs-utils-2.4.2/utils/idmapd/idmapd.c.old 2019-11-13 17:09:41.000000000 +0000 +++ nfs-utils-2.4.2/utils/idmapd/idmapd.c 2020-01-24 03:35:05.459393437 +0000 @@ -65,6 +65,7 @@ #include <ctype.h> #include <libgen.h> #include <nfsidmap.h> +#include <inttypes.h> #include "xlog.h" #include "conffile.h" @@ -172,7 +173,7 @@ int fd; char stime[32]; - sprintf(stime, "%ld\n", now); + sprintf(stime, "%"PRId64"\n", now); fd = open(path, O_RDWR); if (fd == -1) return -1; @@ -625,7 +626,7 @@ /* Name */ addfield(&bp, &bsiz, im.im_name); /* expiry */ - snprintf(buf1, sizeof(buf1), "%lu", + snprintf(buf1, sizeof(buf1), "%"PRIu64, time(NULL) + cache_entry_expiration); addfield(&bp, &bsiz, buf1); /* Note that we don't want to write the id if the mapping @@ -653,7 +654,7 @@ snprintf(buf1, sizeof(buf1), "%u", im.im_id); addfield(&bp, &bsiz, buf1); /* expiry */ - snprintf(buf1, sizeof(buf1), "%lu", + snprintf(buf1, sizeof(buf1), "%"PRIu64, time(NULL) + cache_entry_expiration); addfield(&bp, &bsiz, buf1); /* Note we're ignoring the status field in this case; we'll --- nfs-utils-2.4.2/utils/nfsdcld/sqlite.c.old 2019-11-13 17:09:41.000000000 +0000 +++ nfs-utils-2.4.2/utils/nfsdcld/sqlite.c 2020-01-24 04:35:02.235281405 +0000 @@ -512,7 +512,7 @@ current_epoch = tcur; recovery_epoch = trec; ret = 0; - xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu", + xlog(D_GENERAL, "%s: current_epoch=%"PRIu64" recovery_epoch=%"PRIu64, __func__, current_epoch, recovery_epoch); out: sqlite3_finalize(stmt); @@ -1223,7 +1223,7 @@ current_epoch = tcur; recovery_epoch = trec; - xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu", + xlog(D_GENERAL, "%s: current_epoch=%"PRIu64" recovery_epoch=%"PRIu64, __func__, current_epoch, recovery_epoch); out: @@ -1282,7 +1282,7 @@ } recovery_epoch = 0; - xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu", + xlog(D_GENERAL, "%s: current_epoch=%"PRIu64" recovery_epoch=%"PRIu64, __func__, current_epoch, recovery_epoch); out: --- nfs-utils-2.4.2/utils/nfsdcltrack/nfsdcltrack.c.old 2019-11-13 17:09:41.000000000 +0000 +++ nfs-utils-2.4.2/utils/nfsdcltrack/nfsdcltrack.c 2020-01-24 04:40:06.871901242 +0000 @@ -38,6 +38,7 @@ #include <sys/inotify.h> #include <dirent.h> #include <limits.h> +#include <inttypes.h> #ifdef HAVE_SYS_CAPABILITY_H #include <sys/prctl.h> #include <sys/capability.h> @@ -525,7 +526,7 @@ if (*tail) return -EINVAL; - xlog(D_GENERAL, "%s: grace done. gracetime=%ld", __func__, gracetime); + xlog(D_GENERAL, "%s: grace done. gracetime=%"PRId64, __func__, gracetime); ret = sqlite_remove_unreclaimed(gracetime); --- nfs-utils-2.4.2/utils/nfsdcltrack/sqlite.c.old 2019-11-13 17:09:41.000000000 +0000 +++ nfs-utils-2.4.2/utils/nfsdcltrack/sqlite.c 2020-01-24 04:40:31.519202517 +0000 @@ -48,6 +48,7 @@ #include <fcntl.h> #include <unistd.h> #include <sqlite3.h> +#include <inttypes.h> #include <linux/limits.h> #include "xlog.h" @@ -544,7 +545,7 @@ int ret; char *err = NULL; - ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %ld", + ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %"PRId64, grace_start); if (ret < 0) { return ret;