summaryrefslogtreecommitdiff
path: root/testing/hstox/byteswap.h
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2016-10-01 00:26:52 +0100
committeriphydf <iphydf@users.noreply.github.com>2016-10-01 02:13:34 +0100
commitc037100747a1a224160cb12defb600ddfe1ba927 (patch)
tree8332a7d288116b802866e1ed98d1b950425206f7 /testing/hstox/byteswap.h
parent1977d56caaff40ea9bbf6754b69bec9539a5a969 (diff)
Import the hstox SUT interface from hstox.
We'll maintain it in the c-toxcore repo, where it belongs.
Diffstat (limited to 'testing/hstox/byteswap.h')
-rw-r--r--testing/hstox/byteswap.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/testing/hstox/byteswap.h b/testing/hstox/byteswap.h
new file mode 100644
index 00000000..b5a58f66
--- /dev/null
+++ b/testing/hstox/byteswap.h
@@ -0,0 +1,6 @@
1#ifdef __APPLE__
2#include <libkern/OSByteOrder.h>
3
4#define htobe64(x) OSSwapHostToBigInt64(x)
5#define be64toh(x) OSSwapBigToHostInt64(x)
6#endif