OSX uses <machine/endian.h> instead of <endian.h>, and while a conditional include could be done with preprocessor directives (or passing CFLAGS="$CFLAGS -I~/usr/include/machine conditionally in CMake), using <sys/types.h> (which is cross platform) seems easier.
Stops relying on template argument deduction for std::min and std::max calls. Or maybe you would prefer to cast these to the same type... if so i can update to that behavior, let me know. Either way whats in here fails on OSX.
This resolves two issues building on OSX:
<machine/endian.h>
instead of<endian.h>
, and while a conditional include could be done with preprocessor directives (or passingCFLAGS="$CFLAGS -I~/usr/include/machine
conditionally in CMake), using<sys/types.h>
(which is cross platform) seems easier.std::min
andstd::max
calls. Or maybe you would prefer to cast these to the same type... if so i can update to that behavior, let me know. Either way whats in here fails on OSX.