From: Khem Raj <raj.khem@gmail.com>
To: linux-nfs@vger.kernel.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH] cacheio: use intmax_t for formatted IO
Date: Sat, 1 Dec 2018 10:16:20 -0800 [thread overview]
Message-ID: <20181201181621.7268-1-raj.khem@gmail.com> (raw)
time_t is not same size on x32 ABI (ILP32)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
support/nfs/cacheio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c
index 9dc4cf1..2086a95 100644
--- a/support/nfs/cacheio.c
+++ b/support/nfs/cacheio.c
@@ -17,6 +17,7 @@
#include <nfslib.h>
#include <stdio.h>
+#include <inttypes.h>
#include <stdio_ext.h>
#include <string.h>
#include <ctype.h>
@@ -234,7 +235,7 @@ cache_flush(int force)
stb.st_mtime > now)
stb.st_mtime = time(0);
- sprintf(stime, "%ld\n", stb.st_mtime);
+ sprintf(stime, "%jd\n", (intmax_t)stb.st_mtime);
for (c=0; cachelist[c]; c++) {
int fd;
sprintf(path, "/proc/net/rpc/%s/flush", cachelist[c]);
--
2.19.2
next reply other threads:[~2018-12-01 18:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-01 18:16 Khem Raj [this message]
2018-12-01 18:16 ` [PATCH] Do not pass null pointer to freeaddrinfo() Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181201181621.7268-1-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox