From 88c584c2f08a58cca1e5fbe7c0623be7af4e524b Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 4 Jan 2020 23:17:22 +0100 Subject: [PATCH] goldendict: fix build on some 64-bit BE systems --- srcpkgs/goldendict/patches/endian.patch | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 srcpkgs/goldendict/patches/endian.patch diff --git a/srcpkgs/goldendict/patches/endian.patch b/srcpkgs/goldendict/patches/endian.patch new file mode 100644 index 00000000000..16b9914f0b8 --- /dev/null +++ b/srcpkgs/goldendict/patches/endian.patch @@ -0,0 +1,25 @@ +commit eb90c044c0092da49e3cbf393ad68599354616b2 +Author: q66 +Date: Sat Jan 4 23:12:59 2020 +0100 + + Fix build on some 64-bit big endian systems + + The problem here is that qbswap is defined for quint64, which + is an alias to unsigned long long, while the uint64_t type in + the failing contexts is unsigned long. + + This will fail with undefined reference to qbswap. + +diff --git ripemd.cc ripemd.cc +index bad8fc7..24ac811 100644 +--- ripemd.cc ++++ ripemd.cc +@@ -173,7 +173,7 @@ void RIPEMD128::update( const uint8_t * data, size_t len ) + + void RIPEMD128::digest( uint8_t * digest ) + { +- uint64_t finalcount = qFromLittleEndian( count << 3 ); ++ uint64_t finalcount = qFromLittleEndian( count << 3 ); + update( (const uint8_t *) "\200", 1 ); + while ( ( count & 63 ) != 56 ) + update( ( const uint8_t * ) "", 1 );