From patchwork Fri May 11 12:20:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 158594 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 E0ADCB700C for ; Sat, 12 May 2012 06:38:07 +1000 (EST) Received: from localhost ([::1]:47426 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSwbF-0000rb-Nj for incoming@patchwork.ozlabs.org; Fri, 11 May 2012 16:38:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSoq5-0006si-T9 for qemu-devel@nongnu.org; Fri, 11 May 2012 08:21:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSopz-00060H-C4 for qemu-devel@nongnu.org; Fri, 11 May 2012 08:20:53 -0400 Received: from smtp.citrix.com ([66.165.176.89]:50964) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSopz-000602-7X for qemu-devel@nongnu.org; Fri, 11 May 2012 08:20:47 -0400 X-IronPort-AV: E=Sophos;i="4.75,571,1330923600"; d="scan'208";a="25098911" Received: from ftlpmailmx02.citrite.net ([10.13.107.66]) by FTLPIPO01.CITRIX.COM with ESMTP/TLS/RC4-MD5; 11 May 2012 08:20:44 -0400 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.66) with Microsoft SMTP Server id 8.3.213.0; Fri, 11 May 2012 08:20:44 -0400 Received: from [10.80.3.120] (helo=dhcp-3-120.uk.xensource.com.com) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1SSopv-0001Q7-Rr; Fri, 11 May 2012 13:20:43 +0100 From: Roger Pau Monne To: qemu-devel@nongnu.org Date: Fri, 11 May 2012 13:20:34 +0100 Message-ID: <1336738834-27814-1-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.89 X-Mailman-Approved-At: Fri, 11 May 2012 16:37:53 -0400 Cc: Roger Pau Monne Subject: [Qemu-devel] [PATCH] audio: fix bug in mixeng_template.h build on NetBSD 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 is a bug fix for rc1, although I think this bug has been present for a long time. NetBSD has typedefs and defines of types, so all the types specified in mixeng.c IN_T define (int8_t, uint8_t...) got expanded to __int8_t, __uint8_t, and the construction of types in mixeng_template.h failed. audio/mixeng.c:150:17: error: 'conv_natural_uint8_t_to_mono' undeclared here (not in a function) [...] audio/mixeng_template.h:114:1: warning: 'conv_natural___uint8_t_to_mono' defined but not used [...] Undef those types, so we can safely compile. This is safe even if the types are not defined. Cc: Vassili Karpov (malc) Signed-off-by: Roger Pau Monne --- audio/mixeng_template.h | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/audio/mixeng_template.h b/audio/mixeng_template.h index e644c23..33e6b61 100644 --- a/audio/mixeng_template.h +++ b/audio/mixeng_template.h @@ -27,6 +27,18 @@ * dec++'ified by Dscho */ +/* + * Remove definitions of types, to prevent expansion in "glue" macro. + * This is needed at least for NetBSD, but any operating system that + * has those defines will probably cause trouble. + */ +#undef int8_t +#undef uint8_t +#undef int16_t +#undef uint16_t +#undef int32_t +#undef uint32_t + #ifndef SIGNED #define HALF (IN_MAX >> 1) #endif