|
@@ -61,7 +61,11 @@
|
|
#include <linux/bitops.h>
|
|
#include <linux/bitops.h>
|
|
#else
|
|
#else
|
|
#include <errno.h>
|
|
#include <errno.h>
|
|
|
|
+#if defined(__FreeBSD__)
|
|
|
|
+#include <sys/endian.h>
|
|
|
|
+#else
|
|
#include <endian.h>
|
|
#include <endian.h>
|
|
|
|
+#endif
|
|
#include <stdint.h>
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <string.h>
|
|
@@ -113,6 +117,7 @@ struct gf_poly_deg1 {
|
|
};
|
|
};
|
|
|
|
|
|
#ifdef USE_HOSTCC
|
|
#ifdef USE_HOSTCC
|
|
|
|
+#ifndef __BSD_VISIBLE
|
|
static int fls(int x)
|
|
static int fls(int x)
|
|
{
|
|
{
|
|
int r = 32;
|
|
int r = 32;
|
|
@@ -142,6 +147,7 @@ static int fls(int x)
|
|
return r;
|
|
return r;
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
+#endif
|
|
|
|
|
|
/*
|
|
/*
|
|
* same as encode_bch(), but process input data one byte at a time
|
|
* same as encode_bch(), but process input data one byte at a time
|