fix issue on big endian architecture

OSMO_IS_LITTLE_ENDIAN is always defined and has a value of
either 0 or 1
as a result in byteswap.h the corresponding swap functions
will be always called, independent of the endianess

Signed-off-by: Thorsten Alteholz <osmocom@alteholz.de>
Change-Id: I4a09d2d8ccf155e70a3977ae1747758b6bc5125e
This commit is contained in:
Thorsten Alteholz 2018-04-07 23:06:29 +02:00 committed by Harald Welte
parent aead241df0
commit cefce6688b
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ static inline uint16_t osmo_swab16(uint16_t in)
return out;
}
#ifdef OSMO_IS_LITTLE_ENDIAN
#if OSMO_IS_LITTLE_ENDIAN == 1
#define osmo_ntohl(x) osmo_swab32(x)
#define osmo_ntohs(x) osmo_swab16(x)
#define osmo_htonl(x) osmo_swab32(x)