macos endian patch (Thanks, Jared!)

This commit is contained in:
Mike Ossmann
2012-06-18 04:35:21 +00:00
parent 61d2591bc0
commit bae2caab19
2 changed files with 11 additions and 1 deletions
-1
View File
@@ -24,7 +24,6 @@
#include <stdbool.h>
#include <string.h>
#include <time.h>
#include <endian.h>
#include <bluetooth_packet.h>
+11
View File
@@ -28,6 +28,17 @@
#include <libusb-1.0/libusb.h>
#endif
#if defined __MACH__
#include <CoreServices/CoreServices.h>
#define htobe32 EndianU32_NtoB
#define be32toh EndianU32_BtoN
#define le32toh EndianU32_LtoN
#define htobe64 EndianU64_NtoB
#define be64toh EndianU64_BtoN
#else
#include <endian.h>
#endif
#include <stdio.h>
#include <bluetooth_piconet.h>