etwmc / Personal-HomeKit-HAP

This project will provide source code to build a HomeKit support accessories.
MIT License
236 stars 85 forks source link

byteswap.h and OSX #50

Closed rawmean closed 8 years ago

rawmean commented 9 years ago

byteswap.h is not portable and is not included in OSX so the code does not compile on OS X anymore.

yannickulrich commented 9 years ago

Change the include line to the following:

#if defined(__APPLE__)
#include <libkern/OSByteOrder.h>
#define bswap_16 OSSwapInt16
#define bswap_32 OSSwapInt32
#define bswap_64 OSSwapInt64
#else
#include <byteswap.h>
#endif

worked for me on Yosemite

etwmc commented 8 years ago

byteswap.h has been removed from the new commit, so I would temporary close it until it occurs again