diff options
author | Jonathan Gray <jsg@jsg.id.au> | 2017-08-27 20:45:14 +1000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-09-03 15:30:31 -0400 |
commit | 8f1603bd78a31f52927d398f600e47e2452997a6 (patch) | |
tree | 01b6fc85b5b00155dddbc946b466a427e3a7fb6a /lib/bch.c | |
parent | e090579d0a2d1aa38eab94b98877de9bcdd4f31d (diff) | |
download | u-boot-8f1603bd78a31f52927d398f600e47e2452997a6.tar.gz u-boot-8f1603bd78a31f52927d398f600e47e2452997a6.tar.bz2 u-boot-8f1603bd78a31f52927d398f600e47e2452997a6.zip |
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>
Diffstat (limited to 'lib/bch.c')
-rw-r--r-- | lib/bch.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -117,7 +117,7 @@ struct gf_poly_deg1 { }; #ifdef USE_HOSTCC -#ifndef __BSD_VISIBLE +#if !defined(__DragonFly__) && !defined(__FreeBSD__) static int fls(int x) { int r = 32; |