Skip to content

Commit da770a7

Browse files
committed
endianness.h: Default to little endian
1 parent f614e0c commit da770a7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/endianness.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
#endif
2020
#endif
2121

22+
#ifndef __BYTE_ORDER
23+
#ifndef _WIN32
24+
#warning __BYTE_ORDER is not defined, assuming little endian
25+
#endif
26+
#define __BYTE_ORDER __LITTLE_ENDIAN
27+
#endif
28+
2229
#ifndef be16toh
2330
#if __BYTE_ORDER == __BIG_ENDIAN
2431
#define be16toh(x) (x)

0 commit comments

Comments
 (0)