summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorsigsegv7 <ian@vegaa.systems>2023-09-17 21:04:46 -0400
committersigsegv7 <ian@vegaa.systems>2023-09-17 21:04:46 -0400
commit082e28b8eba65c09380f3117d2f71016050c560a (patch)
tree636e6d964136beb3a1dad25099cd4842606a597e /main.c
parenta09131000810c162e2a0f4265524af43a35d0937 (diff)
Ensure little endian
Signed-off-by: sigsegv7 <ian@vegaa.systems>
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.c b/main.c
index 0a3c757..9027169 100644
--- a/main.c
+++ b/main.c
@@ -33,6 +33,10 @@
#include <assert.h>
#include <unistd.h>
+#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
+#error "Big endian machines not supported yet"
+#endif
+
#define flip_block(TMP_VAR, TYPE, BUF, POS) \
TMP_VAR = *(TYPE *)&BUF[POS]; \
TMP_VAR = ~TMP_VAR; \