diff options
author | Thorsten Alteholz <osmocom@alteholz.de> | 2018-04-07 23:06:29 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-04-09 17:32:11 +0000 |
commit | cefce6688b00f05013cc869b2f6ecb080eeb9da4 (patch) | |
tree | 700290f2de613aff02d29a3e3638c333ddc7c361 | |
parent | aead241df0282344e068dbae4d4221dbad7a71d9 (diff) |
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
-rw-r--r-- | include/osmocom/core/byteswap.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmocom/core/byteswap.h b/include/osmocom/core/byteswap.h index 1ea5b3db..cecdc63e 100644 --- a/include/osmocom/core/byteswap.h +++ b/include/osmocom/core/byteswap.h @@ -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) |