From patchwork Fri May 23 16:15:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 351953 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0A403140076 for ; Sat, 24 May 2014 02:16:04 +1000 (EST) Received: from localhost ([::1]:44726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wns8X-00030H-HL for incoming@patchwork.ozlabs.org; Fri, 23 May 2014 12:16:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wns8H-0002h4-48 for qemu-devel@nongnu.org; Fri, 23 May 2014 12:15:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wns8G-0002eE-A9 for qemu-devel@nongnu.org; Fri, 23 May 2014 12:15:45 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:48231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wns8F-0002dW-Vg for qemu-devel@nongnu.org; Fri, 23 May 2014 12:15:44 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Wns8D-0004Bm-7A; Fri, 23 May 2014 17:15:41 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 23 May 2014 17:15:41 +0100 Message-Id: <1400861741-16077-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Kevin Wolf , Peter Bartoli , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Stefan Hajnoczi , patches@linaro.org Subject: [Qemu-devel] [PATCH] block/raw-posix.c: Avoid nonstandard LONG_LONG_MAX X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Signed-off-by: Peter Maydell Reviewed-by: Stefan Hajnoczi --- block/raw-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index 6586a0c..b7f0f26 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -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