From patchwork Tue Apr 24 13:27:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Walle X-Patchwork-Id: 154735 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9321DB6FDD for ; Wed, 25 Apr 2012 04:16:05 +1000 (EST) Received: from localhost ([::1]:54652 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMkHS-0000Dn-LZ for incoming@patchwork.ozlabs.org; Tue, 24 Apr 2012 14:16:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMfmF-00012M-CA for qemu-devel@nongnu.org; Tue, 24 Apr 2012 09:27:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMfm8-0006ct-KN for qemu-devel@nongnu.org; Tue, 24 Apr 2012 09:27:30 -0400 Received: from smtprelay06.ispgateway.de ([80.67.31.103]:53520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMfm8-0006cR-ET for qemu-devel@nongnu.org; Tue, 24 Apr 2012 09:27:24 -0400 Received: from [88.217.120.22] (helo=localhost) by smtprelay06.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1SMfm4-00063M-Kq; Tue, 24 Apr 2012 15:27:20 +0200 From: Bernhard Walle To: qemu-devel@nongnu.org Date: Tue, 24 Apr 2012 15:27:19 +0200 Message-Id: <1335274039-99563-1-git-send-email-bernhard@bwalle.de> X-Mailer: git-send-email 1.7.10 X-Df-Sender: YmVybmhhcmRAYndhbGxlLmRl X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.67.31.103 X-Mailman-Approved-At: Tue, 24 Apr 2012 14:15:57 -0400 Cc: blauwirbel@gmail.com, peter.maydell@linaro.org, andreas.faerber@web.de, aliguori@us.ibm.com, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH] cocoa: Fix build 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 This patch is from MacPorts [1]. I don't know the origin, but as it's quite trivial I hope it's okay to post it without that information. At least it fixes building QEMU on Mac OS 10.7. The compiler error without that patch: -------------------------- 8< ----------------------------------- /Users/bwalle/devel/qemu/fpu/softfloat.h:60: error: conflicting types for 'uint16' /System/Library/Frameworks/Security.framework/Headers/cssmconfig.h:73: error: previous declaration of 'uint16' was here -------------------------- >8 ----------------------------------- Signed-off-by: Bernhard Walle [1] https://trac.macports.org/browser/trunk/dports/emulators/qemu/files/patch-cocoa-uint16-redefined.diff --- fpu/softfloat.h | 2 ++ ui/cocoa.m | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fpu/softfloat.h b/fpu/softfloat.h index 2ce4110..7cabe0f 100644 --- a/fpu/softfloat.h +++ b/fpu/softfloat.h @@ -57,7 +57,9 @@ typedef uint8_t flag; typedef uint8_t uint8; typedef int8_t int8; #ifndef _AIX +#if !(defined(__APPLE__) && defined(_UINT16)) typedef int uint16; +#endif typedef int int16; #endif typedef unsigned int uint32; diff --git a/ui/cocoa.m b/ui/cocoa.m index e7d6e89..7feeeff 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -22,13 +22,14 @@ * THE SOFTWARE. */ -#import -#include - #include "qemu-common.h" #include "console.h" #include "sysemu.h" +#define _UINT16 +#import +#include + #ifndef MAC_OS_X_VERSION_10_4 #define MAC_OS_X_VERSION_10_4 1040 #endif