blob: 0f64eabc944ef411ec8a386415440a652c114b5e [file] [log] [blame]
Brad Bishop87b3cb82019-11-15 16:35:37 -05001From fe56b67a2915a8632ea30604c14241f335dd3c15 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 12 Nov 2019 10:49:46 -0800
4Subject: [PATCH] hgfsServerLinux: Consider 64bit time_t possibility
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 .../lib/hgfsServer/hgfsServerLinux.c | 19 +++++--------------
10 1 file changed, 5 insertions(+), 14 deletions(-)
11
12diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
13index 03175623..554da67f 100644
14--- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
15+++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
16@@ -2561,20 +2561,11 @@ HgfsStatToFileAttr(struct stat *stats, // IN: stat information
17 LOG(4, ("%s: done, permissions %o%o%o%o, size %"FMT64"u\n", __FUNCTION__,
18 attr->specialPerms, attr->ownerPerms, attr->groupPerms,
19 attr->otherPerms, attr->size));
20-#ifdef __FreeBSD__
21-# if !defined(VM_X86_64) && __FreeBSD_version >= 500043
22-# define FMTTIMET ""
23-# else
24-# define FMTTIMET "l"
25-# endif
26-#else
27-# define FMTTIMET "l"
28-#endif
29- LOG(4, ("access: %"FMTTIMET"d/%"FMT64"u \nwrite: %"FMTTIMET"d/%"FMT64"u \n"
30- "attr: %"FMTTIMET"d/%"FMT64"u\n",
31- stats->st_atime, attr->accessTime, stats->st_mtime, attr->writeTime,
32- stats->st_ctime, attr->attrChangeTime));
33-#undef FMTTIMET
34+ LOG(4, ("access: %jd/%"FMT64"u \nwrite: %jd/%"FMT64"u \n"
35+ "attr: %jd/%"FMT64"u\n",
36+ (intmax_t)stats->st_atime, attr->accessTime,
37+ (intmax_t)stats->st_mtime, attr->writeTime,
38+ (intmax_t)stats->st_ctime, attr->attrChangeTime));
39
40 attr->userId = stats->st_uid;
41 attr->groupId = stats->st_gid;