diff -Nru osmo-iuh-0.3.0/debian/changelog osmo-iuh-0.3.0/debian/changelog --- osmo-iuh-0.3.0/debian/changelog 2018-11-05 20:54:43.000000000 +0000 +++ osmo-iuh-0.3.0/debian/changelog 2018-12-06 20:54:14.000000000 +0000 @@ -1,3 +1,10 @@ +osmo-iuh (0.3.0-5) unstable; urgency=medium + + * debian/patches/fix_bigend_tests.patch: + - Fix build and test suite on big endian architectures (Closes: #913634) + + -- Ruben Undheim Thu, 06 Dec 2018 21:54:14 +0100 + osmo-iuh (0.3.0-4) unstable; urgency=low * Upload to unstable diff -Nru osmo-iuh-0.3.0/debian/patches/fix_bigend_tests.patch osmo-iuh-0.3.0/debian/patches/fix_bigend_tests.patch --- osmo-iuh-0.3.0/debian/patches/fix_bigend_tests.patch 1970-01-01 00:00:00.000000000 +0000 +++ osmo-iuh-0.3.0/debian/patches/fix_bigend_tests.patch 2018-12-06 20:54:14.000000000 +0000 @@ -0,0 +1,59 @@ +From: Debian Mobcom Maintainers + +Date: Thu, 6 Dec 2018 21:51:02 +0100 +Subject: Fix test suite for big endian architectures + +--- + src/ranap_msg_factory.c | 6 ++++++ + src/tests/test-helpers.c | 5 ++++- + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c +index c287f02..248a6d6 100644 +--- a/src/ranap_msg_factory.c ++++ b/src/ranap_msg_factory.c +@@ -27,6 +27,8 @@ + #include + #include + #include ++#include ++#include + + #define DRANAP _ranap_DRANAP + +@@ -122,7 +124,11 @@ struct msgb *ranap_new_msg_initial_ue(uint32_t conn_id, int is_ps, + struct msgb *msg; + uint32_t ctxidbuf; + int rc; ++#if OSMO_IS_BIG_ENDIAN == 1 ++ uint16_t buf0 = 0x4223; ++#else + uint16_t buf0 = 0x2342; ++#endif + + memset(&ies, 0, sizeof(ies)); + if (is_ps) +diff --git a/src/tests/test-helpers.c b/src/tests/test-helpers.c +index f218a79..3799bc3 100644 +--- a/src/tests/test-helpers.c ++++ b/src/tests/test-helpers.c +@@ -31,6 +31,7 @@ + #include + + #include ++#include + + int asn1_xer_print = 0; + void *talloc_asn1_ctx; +@@ -98,8 +99,10 @@ void test_asn1_helpers(void) + printf("Decoding back to uint32_t: 0x%x\n", res); + ASSERT(res == val1); + ++ uint32_t val1_adjusted; ++ val1_adjusted = osmo_swab32(osmo_htonl(val1)); + printf("Encoding %s to 24-bit asn.1 bitstring\n", +- osmo_hexdump_nospc((unsigned char*)&val1, 3)); ++ osmo_hexdump_nospc((unsigned char*)&val1_adjusted, 3)); + asn1_u24_to_bitstring(&enc, &tmpval, val1); + + ASSERT(enc.size == 24/8); diff -Nru osmo-iuh-0.3.0/debian/patches/series osmo-iuh-0.3.0/debian/patches/series --- osmo-iuh-0.3.0/debian/patches/series 2018-11-05 20:54:43.000000000 +0000 +++ osmo-iuh-0.3.0/debian/patches/series 2018-12-06 20:54:14.000000000 +0000 @@ -1,2 +1,3 @@ spelling.patch reproducible-build.patch +fix_bigend_tests.patch