diff --git a/endian.h b/endian.h index 06f448b91..5a05b444b 100644 --- a/endian.h +++ b/endian.h @@ -28,7 +28,11 @@ #include #define ethash_swap_u32(input_) _byteswap_ulong(input_) #define ethash_swap_u64(input_) _byteswap_uint64(input_) -#else +#elif defined(__APPLE__) +#include +#define ethash_swap_u32(input_) OSSwapInt32(input_) +#define ethash_swap_u64(input_) OSSwapInt64(input_) +#else // posix #include #define ethash_swap_u32(input_) __bswap_32(input_) #define ethash_swap_u64(input_) __bswap_64(input_)