1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

fix compile error on macOS Mojave

This commit is contained in:
默默
2019-03-31 16:07:03 +08:00
committed by Tom Rini
parent 2118a272e3
commit ab8fc41302
2 changed files with 15 additions and 1 deletions

View File

@@ -62,6 +62,9 @@
#include <errno.h>
#if defined(__FreeBSD__)
#include <sys/endian.h>
#elif defined(__APPLE__)
#include <machine/endian.h>
#include <libkern/OSByteOrder.h>
#else
#include <endian.h>
#endif
@@ -70,7 +73,11 @@
#include <string.h>
#undef cpu_to_be32
#if defined(__APPLE__)
#define cpu_to_be32 OSSwapHostToBigInt32
#else
#define cpu_to_be32 htobe32
#endif
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
#define kmalloc(size, flags) malloc(size)
#define kzalloc(size, flags) calloc(1, size)
@@ -116,7 +123,7 @@ struct gf_poly_deg1 {
};
#ifdef USE_HOSTCC
#if !defined(__DragonFly__) && !defined(__FreeBSD__)
#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__APPLE__)
static int fls(int x)
{
int r = 32;