diff --git a/utils/nfsdcltrack/nfsdcltrack.c b/utils/nfsdcltrack/nfsdcltrack.c index b45a904..6b1049f 100644 --- a/utils/nfsdcltrack/nfsdcltrack.c +++ b/utils/nfsdcltrack/nfsdcltrack.c @@ -25,9 +25,11 @@ #include #include -#include #include #include +#include +#include +#include #include #include #include @@ -525,7 +527,8 @@ cltrack_gracedone(const char *timestr) if (*tail) return -EINVAL; - xlog(D_GENERAL, "%s: grace done. gracetime=%ld", __func__, gracetime); + xlog(D_GENERAL, "%s: grace done. gracetime=%" PRId64, __func__, + (int64_t)gracetime); ret = sqlite_remove_unreclaimed(gracetime); diff --git a/utils/nfsdcltrack/sqlite.c b/utils/nfsdcltrack/sqlite.c index 2801201..c4e0cdf 100644 --- a/utils/nfsdcltrack/sqlite.c +++ b/utils/nfsdcltrack/sqlite.c @@ -42,6 +42,8 @@ #include #include #include +#include +#include #include #include #include @@ -544,8 +546,8 @@ sqlite_remove_unreclaimed(time_t grace_start) int ret; char *err = NULL; - ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %ld", - grace_start); + ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %" PRId64, + (int64_t)grace_start); if (ret < 0) { return ret; } else if ((size_t)ret >= sizeof(buf)) {