qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] audio: fix bug in mixeng_template.h build on NetBSD
@ 2012-05-11 12:20 Roger Pau Monne
  2012-05-11 19:01 ` malc
  0 siblings, 1 reply; 4+ messages in thread
From: Roger Pau Monne @ 2012-05-11 12:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Roger Pau Monne

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) <av1474@comtv.ru>
Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
---
 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)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-14 20:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-11 12:20 [Qemu-devel] [PATCH] audio: fix bug in mixeng_template.h build on NetBSD Roger Pau Monne
2012-05-11 19:01 ` malc
2012-05-14  9:05   ` Roger Pau Monne
2012-05-14 20:51     ` malc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).