summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/macros.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/macros.h b/include/macros.h
index 4676e7023..31240c89c 100644
--- a/include/macros.h
+++ b/include/macros.h
@@ -110,11 +110,13 @@
// Envelopes are always stored as big endian, to match sequence files which are
// byte blobs and can embed envelopes. Hence this byteswapping macro.
+#ifndef BSWAP16
#if IS_BIG_ENDIAN
#define BSWAP16(x) (x)
#else
#define BSWAP16(x) (((x) & 0xff) << 8 | (((x) >> 8) & 0xff))
#endif
+#endif
/**
* (u8*) dl : Cast array down to u8's