From: Phil Calvin Date: Sat, 8 Feb 2014 04:14:52 +0000 (-0500) Subject: Build on Mac OS 10.9 by using libkern/OSByteOrder.h X-Git-Tag: b43-fwcutter-019~8 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=30e3fca2e44c77faf9782bae2d7490877deddbd7;p=b43-tools.git Build on Mac OS 10.9 by using libkern/OSByteOrder.h --- diff --git a/fwcutter/fwcutter.c b/fwcutter/fwcutter.c index e9082f9..3591eb2 100644 --- a/fwcutter/fwcutter.c +++ b/fwcutter/fwcutter.c @@ -40,6 +40,8 @@ #if defined(__DragonFly__) || defined(__FreeBSD__) #include +#elif defined(__APPLE__) +#include #else #include #endif diff --git a/fwcutter/fwcutter.h b/fwcutter/fwcutter.h index a441322..3b04c66 100644 --- a/fwcutter/fwcutter.h +++ b/fwcutter/fwcutter.h @@ -20,6 +20,9 @@ typedef uint32_t le32_t; /* Little-endian 32bit */ #if defined(__DragonFly__) || defined(__FreeBSD__) #define bswap_16 bswap16 #define bswap_32 bswap32 +#elif defined(__APPLE__) +#define bswap_16 OSSwapInt16 +#define bswap_32 OSSwapInt32 #endif #define ARG_MATCH 0