Fixed a bug on platforms without `BYTE_ORDER`; ref
@@ -71,7 +71,9 @@ static unsigned char base64_dec_tab[128];
# elif BYTE_ORDER == LITTLE_ENDIAN
# define littleendian 1
# define check_little_endian() (void)0
-# else
+# endif
+#endif
+#ifndef littleendian
/* can't distinguish endian in compile time */
static int littleendian = 0;
static void
@@ -81,7 +83,6 @@ check_little_endian(void)
littleendian = (*(unsigned char *)&n == 1);
}
#endif
-#endif
static unsigned int
hex2int(unsigned char ch)
