summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0004-Use-uintmax_t-for-handling-rlim_t.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0004-Use-uintmax_t-for-handling-rlim_t.patch')
-rw-r--r--meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0004-Use-uintmax_t-for-handling-rlim_t.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0004-Use-uintmax_t-for-handling-rlim_t.patch b/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0004-Use-uintmax_t-for-handling-rlim_t.patch
new file mode 100644
index 000000000..e802dca4e
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0004-Use-uintmax_t-for-handling-rlim_t.patch
@@ -0,0 +1,29 @@
+From e694a122c1ff32d8b951ae55756796f9576d23ed Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 13 Jun 2018 23:37:09 -0700
+Subject: [PATCH] Use uintmax_t for handling rlim_t
+
+rlimit types are not representable with long or long long
+formats, therefore use uintmax_t to typecast rlim_t types
+and use %j to print it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ open-vm-tools/lib/hgfsServer/hgfsServerLinux.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/hgfsServer/hgfsServerLinux.c b/lib/hgfsServer/hgfsServerLinux.c
+index 2e73707d..a2fdb850 100644
+--- a/lib/hgfsServer/hgfsServerLinux.c
++++ b/lib/hgfsServer/hgfsServerLinux.c
+@@ -5294,8 +5294,8 @@ HgfsWriteCheckIORange(off_t offset, // IN:
+ goto exit;
+ }
+
+- LOG(6, ("%s: File Size limits: 0x%"FMT64"x 0x%"FMT64"x\n",
+- __FUNCTION__, fileSize.rlim_cur, fileSize.rlim_max));
++ LOG(6, ("%s: File Size limits: 0x%jx 0x%jx\n",
++ __FUNCTION__, (uintmax_t)fileSize.rlim_cur, (uintmax_t)fileSize.rlim_max));
+
+ /*
+ * Check the offset is within the file size range.
OpenPOWER on IntegriCloud