Skip to content

Instantly share code, notes, and snippets.

@iamleot
Created May 21, 2015 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamleot/07f7408dbc9ab0b09e94 to your computer and use it in GitHub Desktop.
Save iamleot/07f7408dbc9ab0b09e94 to your computer and use it in GitHub Desktop.
mpv-0.9.2: avoid conflicts with NetBSD popcount(3)
$NetBSD$
Avoid conflicts with NetBSD popcount(3).
--- audio/chmap.c.orig 2015-05-19 02:19:25.000000000 +0000
+++ audio/chmap.c
@@ -395,7 +395,7 @@ void mp_chmap_get_reorder(int src[MP_NUM
assert(src[n] < 0 || (to->speaker[n] == from->speaker[src[n]]));
}
-static int popcount64(uint64_t bits)
+static int mp_popcount64(uint64_t bits)
{
int r = 0;
for (int n = 0; n < 64; n++)
@@ -408,7 +408,7 @@ int mp_chmap_diffn(const struct mp_chmap
{
uint64_t a_mask = mp_chmap_to_lavc_unchecked(a);
uint64_t b_mask = mp_chmap_to_lavc_unchecked(b);
- return popcount64((a_mask ^ b_mask) & a_mask);
+ return mp_popcount64((a_mask ^ b_mask) & a_mask);
}
// Returns something like "fl-fr-fc". If there's a standard layout in lavc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment