From 5cc3b7807f2145bef0d2a966f467b577ca0ca3b0 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Sat, 15 Apr 2017 17:33:59 +0200 Subject: [PATCH] Test for target Endianness and abort if it's big-endian --- include/common.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/common.h b/include/common.h index 64958a1ee..7291f749c 100644 --- a/include/common.h +++ b/include/common.h @@ -16,6 +16,10 @@ #error Your Operating System is not supported or detected #endif +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#error "compiling for big-endian architecture not supported" +#endif + #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif