From patchwork Thu Jan 7 23:20:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Use of LONG_LONG_MAX breaks build on OSX ? From: Emmanuel Kasper X-Patchwork-Id: 42488 Message-Id: <4B466C56.5020701@libera.cc> To: qemu-devel@nongnu.org Date: Fri, 08 Jan 2010 00:20:54 +0100 Hello Qemu does not build on my platform ( OSX / 10.5 / PowerPC ) because of the use of LONG_LONG_MAX in raw-posix.c Replacing LONG_LONG_MAX with LLONG_MAX fixes the build and is more standard IMHO ( LONG_LONG_MAX is GNU libc, LLONG_MAX is C99 standard ) The following patch makes this trivial switch. --- block-raw-posix.c.before 2010-01-07 22:40:37.000000000 +0100 +++ block-raw-posix.c 2010-01-07 22:41:43.000000000 +0100 @@ -782,7 +782,7 @@ if (size == 0) #endif #ifdef CONFIG_COCOA - size = LONG_LONG_MAX; + size = LLONG_MAX; #else size = lseek(fd, 0LL, SEEK_END); #endif