From a0956a15878a27d95b86a48e61864dc5efbe922f Mon Sep 17 00:00:00 2001 From: Ruben Undheim Date: Thu, 15 Nov 2018 20:36:05 +0100 Subject: Fix one struct for big-endian archs --- .../0002-Fix-one-struct-for-big-endian-archs.patch | 35 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 36 insertions(+) create mode 100644 debian/patches/0002-Fix-one-struct-for-big-endian-archs.patch 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 +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 + #include + ++#include ++ + #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) diff --git a/debian/patches/series b/debian/patches/series index d507a8a..7a5a310 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 0001-Fix-some-spelling-errors-found-by-lintian.patch +0002-Fix-one-struct-for-big-endian-archs.patch -- cgit v1.2.3