qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] audio: fix bug in mixeng_template.h build on NetBSD


From: Roger Pau Monne
Subject: [Qemu-devel] [PATCH] audio: fix bug in mixeng_template.h build on NetBSD
Date: Fri, 11 May 2012 13:20:34 +0100

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) <address@hidden>
Signed-off-by: Roger Pau Monne <address@hidden>
---
 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
-- 
1.7.7.5 (Apple Git-26)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]