diff mbox

[1/2] ivshmem: Fix compilation (wrong format specifier)

Message ID 1281512334-4268-1-git-send-email-weil@mail.berlios.de
State New
Headers show

Commit Message

Stefan Weil Aug. 11, 2010, 7:38 a.m. UTC
st_size is an off32_t or off64_t, so %ld does not always work.

Cc: Anthony Liguori <aliguori@us.ibm.com>
Cc: Cam Macdonell <cam@cs.ualberta.ca>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 hw/ivshmem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/hw/ivshmem.c b/hw/ivshmem.c
index bbb5cba..ec894e9 100644
--- a/hw/ivshmem.c
+++ b/hw/ivshmem.c
@@ -352,8 +352,8 @@  static int check_shm_size(IVShmemState *s, int fd) {
 
     if (s->ivshmem_size > buf.st_size) {
         fprintf(stderr, "IVSHMEM ERROR: Requested memory size greater");
-        fprintf(stderr, " than shared object size (%" PRIu64 " > %ld)\n",
-                                          s->ivshmem_size, buf.st_size);
+        fprintf(stderr, " than shared object size (%" PRIu64 " > %" PRIu64 ")\n",
+                                          s->ivshmem_size, (uint64_t)buf.st_size);
         return -1;
     } else {
         return 0;