diff options
author | Nikias Bassen | 2021-11-24 03:46:42 +0100 |
---|---|---|
committer | Nikias Bassen | 2021-11-24 03:46:42 +0100 |
commit | 2c6121db9ad84b8aad05b937e071ff7dcc9c8867 (patch) | |
tree | a255055506781da1bd6c0d3cf42f5996189d23a2 /include/endianness.h | |
parent | fa8bfb65c70edd4d2617fbbf970302beb9a4ced2 (diff) | |
download | libimobiledevice-2c6121db9ad84b8aad05b937e071ff7dcc9c8867.tar.gz libimobiledevice-2c6121db9ad84b8aad05b937e071ff7dcc9c8867.tar.bz2 |
Add Reverse Proxy implementation
Diffstat (limited to 'include/endianness.h')
-rw-r--r-- | include/endianness.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/endianness.h b/include/endianness.h index 2d6ad0e..1d414b3 100644 --- a/include/endianness.h +++ b/include/endianness.h @@ -31,6 +31,18 @@ #define htobe16 be16toh #endif +#ifndef le16toh +#if __BYTE_ORDER == __BIG_ENDIAN +#define le16toh(x) ((((x) & 0xFF00) >> 8) | (((x) & 0x00FF) << 8)) +#else +#define le16toh(x) (x) +#endif +#endif + +#ifndef htole16 +#define htole16 le16toh +#endif + #ifndef __bswap_32 #define __bswap_32(x) ((((x) & 0xFF000000) >> 24) \ | (((x) & 0x00FF0000) >> 8) \ |