]> git.proxmox.com Git - mirror_qemu.git/commitdiff
block/raw-posix.c: Avoid nonstandard LONG_LONG_MAX
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 23 May 2014 16:15:41 +0000 (17:15 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 30 May 2014 12:26:54 +0000 (14:26 +0200)
In the MacOSX specific code in raw-posix.c we use the define
LONG_LONG_MAX. This is actually a non-standard pre-C99 define;
switch to using the standard LLONG_MAX instead.

This apparently fixes a compilation failure with certain
compiler/OS versions (though it is unclear which).

Reported-by: Peter Bartoli <peter@bartoli.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/raw-posix.c

index 6586a0c9e1a602715ff526d65dac791af411fc5b..b7f0f2624bc7bbdb9d7d98c3d0eca3b708b9ec9e 100644 (file)
@@ -1192,7 +1192,7 @@ again:
         if (size == 0)
 #endif
 #if defined(__APPLE__) && defined(__MACH__)
-        size = LONG_LONG_MAX;
+        size = LLONG_MAX;
 #else
         size = lseek(fd, 0LL, SEEK_END);
 #endif