diff options
Diffstat (limited to 'debian/patches/0002-Fix-one-struct-for-big-endian-archs.patch')
-rw-r--r-- | debian/patches/0002-Fix-one-struct-for-big-endian-archs.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/debian/patches/0002-Fix-one-struct-for-big-endian-archs.patch b/debian/patches/0002-Fix-one-struct-for-big-endian-archs.patch new file mode 100644 index 0000000..958ef34 --- /dev/null +++ b/debian/patches/0002-Fix-one-struct-for-big-endian-archs.patch @@ -0,0 +1,35 @@ +From: Ruben Undheim <ruben.undheim@gmail.com> +Date: Thu, 15 Nov 2018 20:35:52 +0100 +Subject: Fix one struct for big-endian archs + +--- + src/ipaccess/network_listen.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/ipaccess/network_listen.c b/src/ipaccess/network_listen.c +index bbaf798..d4fa4de 100644 +--- a/src/ipaccess/network_listen.c ++++ b/src/ipaccess/network_listen.c +@@ -39,6 +39,8 @@ + #include <osmocom/bsc/debug.h> + #include <osmocom/abis/e1_input.h> + ++#include <osmocom/core/endian.h> ++ + #define WHITELIST_MAX_SIZE ((NUM_ARFCNS*2)+2+1) + + int ipac_rxlevstat2whitelist(uint16_t *buf, const struct rxlev_stats *st, uint8_t min_rxlev, +@@ -119,8 +121,13 @@ struct ipacc_ferr_elem { + } __attribute__((packed)); + + struct ipacc_cusage_elem { ++#if OSMO_IS_LITTLE_ENDIAN == 1 + uint16_t arfcn:10, + rxlev:6; ++#else ++ uint16_t rxlev:6, ++ arfcn:10; ++#endif + } __attribute__ ((packed)); + + static int test_rep(void *_msg) |