diff options
Diffstat (limited to 'user/nfs-utils/time64.patch')
-rw-r--r-- | user/nfs-utils/time64.patch | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/user/nfs-utils/time64.patch b/user/nfs-utils/time64.patch new file mode 100644 index 000000000..b28ee2f44 --- /dev/null +++ b/user/nfs-utils/time64.patch @@ -0,0 +1,94 @@ +--- 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/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; |