goldendict: fix build on some 64-bit BE systems
This commit is contained in:
parent
ded3cd5986
commit
88c584c2f0
1 changed files with 25 additions and 0 deletions
25
srcpkgs/goldendict/patches/endian.patch
Normal file
25
srcpkgs/goldendict/patches/endian.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
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
|
||||
--- 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<quint64>( count << 3 );
|
||||
update( (const uint8_t *) "\200", 1 );
|
||||
while ( ( count & 63 ) != 56 )
|
||||
update( ( const uint8_t * ) "", 1 );
|
Loading…
Reference in a new issue