diff mbox

build fix for audio/mixeng.c

Message ID 200909071600.02095.Christoph.Egger@amd.com
State Superseded
Headers show

Commit Message

Christoph Egger Sept. 7, 2009, 2 p.m. UTC
Hi!


Attached patch fixes the build errors:

audio/mixeng.c:150: error: 'conv_natural_uint8_t_to_mono' undeclared here (not 
in a function)
audio/mixeng.c:151: error: 'conv_natural_uint16_t_to_mono' undeclared here 
(not in a function)
audio/mixeng.c:152: error: 'conv_natural_uint32_t_to_mono' undeclared here 
(not in a function)
[...]

NetBSD provides standard types by default as both a typedef and a macro hence
the fix makes the function use match the function definition.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
diff mbox

Patch

diff --git a/audio/mixeng.c b/audio/mixeng.c
index 8ce942e..aefdab2 100644
--- a/audio/mixeng.c
+++ b/audio/mixeng.c
@@ -143,56 +143,59 @@ 
 #undef IN_T
 #undef SHIFT
 
+/* NetBSD provides standard types by default as both a typedef and a macro */
+#define concat(x,y,z) glue(glue(x,y),z)
+
 t_sample *mixeng_conv[2][2][2][3] = {
     {
         {
             {
-                conv_natural_uint8_t_to_mono,
-                conv_natural_uint16_t_to_mono,
-                conv_natural_uint32_t_to_mono
+                concat(conv_natural_, uint8_t, _to_mono),
+                concat(conv_natural_, uint16_t, _to_mono),
+                concat(conv_natural_, uint32_t, _to_mono),
             },
             {
-                conv_natural_uint8_t_to_mono,
-                conv_swap_uint16_t_to_mono,
-                conv_swap_uint32_t_to_mono,
+                concat(conv_natural_, uint8_t, _to_mono),
+                concat(conv_swap_, uint16_t, _to_mono),
+                concat(conv_swap_, uint32_t, _to_mono),
             }
         },
         {
             {
-                conv_natural_int8_t_to_mono,
-                conv_natural_int16_t_to_mono,
-                conv_natural_int32_t_to_mono
+                concat(conv_natural_, int8_t, _to_mono),
+                concat(conv_natural_, int16_t, _to_mono),
+                concat(conv_natural_, int32_t, _to_mono)
             },
             {
-                conv_natural_int8_t_to_mono,
-                conv_swap_int16_t_to_mono,
-                conv_swap_int32_t_to_mono
+                concat(conv_natural_, int8_t, _to_mono),
+                concat(conv_swap_, int16_t, _to_mono),
+                concat(conv_swap_, int32_t, _to_mono)
             }
         }
     },
     {
         {
             {
-                conv_natural_uint8_t_to_stereo,
-                conv_natural_uint16_t_to_stereo,
-                conv_natural_uint32_t_to_stereo
+                concat(conv_natural_, uint8_t, _to_stereo),
+                concat(conv_natural_, uint16_t, _to_stereo),
+                concat(conv_natural_, uint32_t, _to_stereo)
             },
             {
-                conv_natural_uint8_t_to_stereo,
-                conv_swap_uint16_t_to_stereo,
-                conv_swap_uint32_t_to_stereo
+                concat(conv_natural_, uint8_t, _to_stereo),
+                concat(conv_swap_, uint16_t, _to_stereo),
+                concat(conv_swap_, uint32_t, _to_stereo)
             }
         },
         {
             {
-                conv_natural_int8_t_to_stereo,
-                conv_natural_int16_t_to_stereo,
-                conv_natural_int32_t_to_stereo
+                concat(conv_natural_, int8_t, _to_stereo),
+                concat(conv_natural_, int16_t, _to_stereo),
+                concat(conv_natural_, int32_t, _to_stereo)
             },
             {
-                conv_natural_int8_t_to_stereo,
-                conv_swap_int16_t_to_stereo,
-                conv_swap_int32_t_to_stereo,
+                concat(conv_natural_, int8_t, _to_stereo),
+                concat(conv_swap_, int16_t, _to_stereo),
+                concat(conv_swap_, int32_t, _to_stereo),
             }
         }
     }
@@ -202,52 +205,52 @@  f_sample *mixeng_clip[2][2][2][3] = {
     {
         {
             {
-                clip_natural_uint8_t_from_mono,
-                clip_natural_uint16_t_from_mono,
-                clip_natural_uint32_t_from_mono
+                concat(clip_natural_, uint8_t, _from_mono),
+                concat(clip_natural_, uint16_t, _from_mono),
+                concat(clip_natural_, uint32_t, _from_mono)
             },
             {
-                clip_natural_uint8_t_from_mono,
-                clip_swap_uint16_t_from_mono,
-                clip_swap_uint32_t_from_mono
+                concat(clip_natural_, uint8_t, _from_mono),
+                concat(clip_swap_, uint16_t, _from_mono),
+                concat(clip_swap_, uint32_t, _from_mono)
             }
         },
         {
             {
-                clip_natural_int8_t_from_mono,
-                clip_natural_int16_t_from_mono,
-                clip_natural_int32_t_from_mono
+                concat(clip_natural_, int8_t, _from_mono),
+                concat(clip_natural_, int16_t, _from_mono),
+                concat(clip_natural_, int32_t, _from_mono)
             },
             {
-                clip_natural_int8_t_from_mono,
-                clip_swap_int16_t_from_mono,
-                clip_swap_int32_t_from_mono
+                concat(clip_natural_, int8_t, _from_mono),
+                concat(clip_swap_, int16_t, _from_mono),
+                concat(clip_swap_, int32_t, _from_mono)
             }
         }
     },
     {
         {
             {
-                clip_natural_uint8_t_from_stereo,
-                clip_natural_uint16_t_from_stereo,
-                clip_natural_uint32_t_from_stereo
+                concat(clip_natural_, uint8_t, _from_stereo),
+                concat(clip_natural_, uint16_t, _from_stereo),
+                concat(clip_natural_, uint32_t, _from_stereo)
             },
             {
-                clip_natural_uint8_t_from_stereo,
-                clip_swap_uint16_t_from_stereo,
-                clip_swap_uint32_t_from_stereo
+                concat(clip_natural_, uint8_t, _from_stereo),
+                concat(clip_swap_, uint16_t, _from_stereo),
+                concat(clip_swap_, uint32_t, _from_stereo)
             }
         },
         {
             {
-                clip_natural_int8_t_from_stereo,
-                clip_natural_int16_t_from_stereo,
-                clip_natural_int32_t_from_stereo
+                concat(clip_natural_, int8_t, _from_stereo),
+                concat(clip_natural_, int16_t, _from_stereo),
+                concat(clip_natural_, int32_t, _from_stereo)
             },
             {
-                clip_natural_int8_t_from_stereo,
-                clip_swap_int16_t_from_stereo,
-                clip_swap_int32_t_from_stereo
+                concat(clip_natural_, int8_t, _from_stereo),
+                concat(clip_swap_, int16_t, _from_stereo),
+                concat(clip_swap_, int32_t, _from_stereo)
             }
         }
     }