hats icon indicating copy to clipboard operation
hats copied to clipboard

Allows eepdump and eepmake to be compiled on Mac OS

Open nekuz0r opened this issue 4 years ago • 0 comments

Mac OS X doesn't provide endian.h. It's only required for the be32toh and htobe32 utility functions. Mac OS X provides similare functions in libkern/OSByteOrder.h.

Respectively OSSwapHostToBigInt32 for htobe32 and OSSwapBigToHostInt32 for be32toh.

This adds a preprocessor condition to include endian.h on non apple system and to include libkern/OSByteOrder.h as well as defining to macro to provide htobe32 and be32toh on apple plateform.

nekuz0r avatar Nov 19 '20 10:11 nekuz0r