From 14fe868ded0a237fb2a447cbad0ca15d6fefe6a6 Mon Sep 17 00:00:00 2001 From: Artem Prilutskiy Date: Fri, 26 May 2017 13:19:25 +0300 Subject: [PATCH] .. --- RewindClient.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/RewindClient.c b/RewindClient.c index e00bec7..389cf2f 100644 --- a/RewindClient.c +++ b/RewindClient.c @@ -2,7 +2,6 @@ #include #include -#include #include #include @@ -28,6 +27,29 @@ } #endif +#ifdef __linux__ +#include +#include +#endif + +#ifdef __MACH__ +#include +#include + +#define htobe16(value) OSSwapHostToBigInt16(value) +#define be16toh(value) OSSwapBigToHostInt16(value) +#define htobe32(value) OSSwapHostToBigInt32(value) +#define be32toh(value) OSSwapBigToHostInt32(value) + +#define htole16(value) OSSwapHostToLittleInt16(value) +#define le16toh(value) OSSwapLittleToHostInt16(value) +#define htole32(value) OSSwapHostToLittleInt32(value) +#define le32toh(value) OSSwapLittleToHostInt32(value) + +#define __bswap_16(value) OSSwapConstInt16(value) +#define __bswap_32(value) OSSwapConstInt32(value) +#endif + #define BUFFER_SIZE 256 #define CONNECTION_ATTEMPT_COUNT 5