From 8ccbd164c711729b8d5954fc3c1b7871e8652302 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 7 Feb 2019 20:06:55 +0000 Subject: [PATCH] uxsftpserver: cast st.st_size to uintmax_t. This fixes a build failure reported by Colin on platforms (armel, mipsel) where off_t and PRIu64 don't match. --- unix/uxsftpserver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unix/uxsftpserver.c b/unix/uxsftpserver.c index 7c485a4a..534f6965 100644 --- a/unix/uxsftpserver.c +++ b/unix/uxsftpserver.c @@ -650,8 +650,9 @@ static void uss_readdir(SftpServer *srv, SftpReplyBuilder *reply, tm = *localtime(&st.st_mtime); longnamebuf = dupprintf( - "%s %3u %-8s %-8s %8"PRIu64" %.3s %2d %02d:%02d %s", - perms, (unsigned)st.st_nlink, user, group, st.st_size, + "%s %3u %-8s %-8s %8"PRIuMAX" %.3s %2d %02d:%02d %s", + perms, (unsigned)st.st_nlink, user, group, + (uintmax_t)st.st_size, (&"JanFebMarAprMayJunJulAugSepOctNovDec"[3*tm.tm_mon]), tm.tm_mday, tm.tm_hour, tm.tm_min, de->d_name); longname = ptrlen_from_asciz(longnamebuf);