51 lines
1.4 KiB
Diff
51 lines
1.4 KiB
Diff
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 <stdio.h>
|
|
#include <stdlib.h>
|
|
-#include <ctype.h>
|
|
#include <errno.h>
|
|
#include <stdbool.h>
|
|
+#include <stdint.h>
|
|
+#include <inttypes.h>
|
|
+#include <ctype.h>
|
|
#include <getopt.h>
|
|
#include <string.h>
|
|
#include <sys/stat.h>
|
|
@@ -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 <errno.h>
|
|
#include <event.h>
|
|
#include <stdbool.h>
|
|
+#include <stdint.h>
|
|
+#include <inttypes.h>
|
|
#include <string.h>
|
|
#include <sys/stat.h>
|
|
#include <sys/types.h>
|
|
@@ -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)) {
|