]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - lib/bch.c
efi_selftest: do not cut off u16 strings when printing
[people/ms/u-boot.git] / lib / bch.c
index ec53483774b5babe49437fa79537e4d80a91b13c..d0d7e25c4ee36f9a3e9f3665023a1b71a4c073c4 100644 (file)
--- a/lib/bch.c
+++ b/lib/bch.c
 #include <linux/bitops.h>
 #else
 #include <errno.h>
+#if defined(__FreeBSD__)
+#include <sys/endian.h>
+#else
 #include <endian.h>
+#endif
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
@@ -113,6 +117,7 @@ struct gf_poly_deg1 {
 };
 
 #ifdef USE_HOSTCC
+#if !defined(__DragonFly__) && !defined(__FreeBSD__)
 static int fls(int x)
 {
        int r = 32;
@@ -142,6 +147,7 @@ static int fls(int x)
        return r;
 }
 #endif
+#endif
 
 /*
  * same as encode_bch(), but process input data one byte at a time