blob: bafff5b9c0cd87208136e4e77cb7996f7bf4ccb1 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001From ac32b813f5d6f9a2de944015cf9bb98d68e0203a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 1 Dec 2018 10:02:12 -0800
4Subject: [PATCH] cacheio: use intmax_t for formatted IO
5
6time_t is not same size on x32 ABI (ILP32)
7
8Upstream-Status: Pending
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 support/nfs/cacheio.c | 3 ++-
13 1 file changed, 2 insertions(+), 1 deletion(-)
14
15diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c
16index 9dc4cf1..2086a95 100644
17--- a/support/nfs/cacheio.c
18+++ b/support/nfs/cacheio.c
19@@ -17,6 +17,7 @@
20
21 #include <nfslib.h>
22 #include <stdio.h>
23+#include <inttypes.h>
24 #include <stdio_ext.h>
25 #include <string.h>
26 #include <ctype.h>
27@@ -234,7 +235,7 @@ cache_flush(int force)
28 stb.st_mtime > now)
29 stb.st_mtime = time(0);
30
31- sprintf(stime, "%ld\n", stb.st_mtime);
32+ sprintf(stime, "%jd\n", (intmax_t)stb.st_mtime);
33 for (c=0; cachelist[c]; c++) {
34 int fd;
35 sprintf(path, "/proc/net/rpc/%s/flush", cachelist[c]);
36--
372.19.2
38