diff options
author | Ruben Undheim <ruben.undheim@gmail.com> | 2018-11-15 20:36:05 +0100 |
---|---|---|
committer | Ruben Undheim <ruben.undheim@gmail.com> | 2018-11-15 20:36:05 +0100 |
commit | a0956a15878a27d95b86a48e61864dc5efbe922f (patch) | |
tree | 7b044f5f837f312bb2ca1b637ef96ce06fe32972 | |
parent | facc5bc3b7878325ffc68cbf8395c07dd7067d54 (diff) |
Fix one struct for big-endian archs
-rw-r--r-- | debian/patches/0002-Fix-one-struct-for-big-endian-archs.patch | 35 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 36 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) 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 |