void-packages/srcpkgs/goldendict/patches/endian.patch

26 lines
882 B
Diff

commit eb90c044c0092da49e3cbf393ad68599354616b2
Author: q66 <daniel@octaforge.org>
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<unsigned long>.
diff --git ripemd.cc ripemd.cc
index bad8fc7..24ac811 100644
--- a/ripemd.cc
+++ b/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<quint64>( count << 3 );
update( (const uint8_t *) "\200", 1 );
while ( ( count & 63 ) != 56 )
update( ( const uint8_t * ) "", 1 );