@@ -107,6 +107,7 @@ struct mixeng_volume nominal_volume = {
#endif
};
+#if !defined(__NetBSD__)
/* http://www.df.lth.se/~john_e/gems/gem002d.html */
/* http://www.multi-platforms.com/Tips/PopCount.htm */
uint32_t popcount (uint32_t u)
@@ -118,6 +119,7 @@ uint32_t popcount (uint32_t u)
u = ( u&0x0000ffff) + (u>>16);
return u;
}
+#endif
inline uint32_t lsbindex (uint32_t u)
{
@@ -147,7 +147,11 @@ static inline void *advance (void *p, int incr)
return (d + incr);
}
+#if defined(__NetBSD__)
+#define popcount(u) popcount32(u)
+#else
uint32_t popcount (uint32_t u);
+#endif
uint32_t lsbindex (uint32_t u);
#ifdef __GNUC__
Hi! Attached patch fixes the warnings on NetBSD: ./audio/audio.h:150: warning: redundant redeclaration of 'popcount' /usr/include/strings.h:57: warning: previous declaration of 'popcount' was here Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>