diff options
| author | 2025-11-24 01:24:56 +0100 | |
|---|---|---|
| committer | 2025-11-24 01:30:08 +0100 | |
| commit | c194db388fb7f1f65ef0a08817f26ed0e8d078b3 (patch) | |
| tree | 02a8b21052295f223de5fd15a99dedf50e6f9cc5 /include | |
| parent | 8d143c95a0ceb4e0bff3a33863349ec712662117 (diff) | |
| download | libimobiledevice-c194db388fb7f1f65ef0a08817f26ed0e8d078b3.tar.gz libimobiledevice-c194db388fb7f1f65ef0a08817f26ed0e8d078b3.tar.bz2 | |
endianness.h: Default to little endian
Diffstat (limited to 'include')
| -rw-r--r-- | include/endianness.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/endianness.h b/include/endianness.h index 88b63db..972e51b 100644 --- a/include/endianness.h +++ b/include/endianness.h | |||
| @@ -19,6 +19,13 @@ | |||
| 19 | #endif | 19 | #endif |
| 20 | #endif | 20 | #endif |
| 21 | 21 | ||
| 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 | |||
| 22 | #ifndef be16toh | 29 | #ifndef be16toh |
| 23 | #if __BYTE_ORDER == __BIG_ENDIAN | 30 | #if __BYTE_ORDER == __BIG_ENDIAN |
| 24 | #define be16toh(x) (x) | 31 | #define be16toh(x) (x) |
