Commit 8f1603bd78a31f52927d398f600e47e2452997a6

Authored by Jonathan Gray
Committed by Tom Rini
1 parent e090579d0a

bch: don't use __BSD_VISIBLE to test for fls

Commit 4ecc988301bc8e981e6d7538c57cdb3aa82f7c1d assumes fls is in libc
if __BSD_VISIBLE is defined.  This appears to only be true on FreeBSD
and DragonFlyBSD.  OpenBSD defines __BSD_VISIBLE and does not have fls
in strings.h/libc.

Switch the test for __BSD_VISIBLE to one for __DragonFly__ and
__FreeBSD__ to unbreak the build on OpenBSD.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -117,7 +117,7 @@
117 117 };
118 118  
119 119 #ifdef USE_HOSTCC
120   -#ifndef __BSD_VISIBLE
  120 +#if !defined(__DragonFly__) && !defined(__FreeBSD__)
121 121 static int fls(int x)
122 122 {
123 123 int r = 32;