diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2019-09-21 16:38:37 +0000 |
---|---|---|
committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2019-09-21 16:38:37 +0000 |
commit | b3d0f198ff79d21ae9c1e27195a7da8dd444e56f (patch) | |
tree | 3dd90f0159b8c67364267a4bad36c43fc79270e7 /net-p2p/litecoin/files | |
parent | audio/protracker: fix build on GCC architectures (diff) |
net-p2p/litecoin: fix build on big-endian architectures
Include sys/endian.h in src/crypto/scrypt.cpp, big-endian architectures need it:
crypto/scrypt.cpp:157:3: error: 'be32enc' was not declared in this scope
157 | be32enc(ivec, (uint32_t)(i + 1));
| ^~~~~~~
crypto/scrypt.cpp: In function 'void scrypt_1024_1_1_256_sp_generic(const char*, char*, char*)':
crypto/scrypt.cpp:269:10: error: 'le32dec' was not declared in this scope
269 | X[k] = le32dec(&B[4 * k]);
| ^~~~~~~
crypto/scrypt.cpp:285:3: error: 'le32enc' was not declared in this scope
285 | le32enc(&B[4 * k], X[k]);
| ^~~~~~~
PR: 240695
Approved by: hsw@bitmark.com (maintainer), linimon (mentor)
Notes
Notes:
svn path=/head/; revision=512525
Diffstat (limited to 'net-p2p/litecoin/files')
-rw-r--r-- | net-p2p/litecoin/files/patch-src_crypto_scrypt.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net-p2p/litecoin/files/patch-src_crypto_scrypt.cpp b/net-p2p/litecoin/files/patch-src_crypto_scrypt.cpp new file mode 100644 index 000000000000..ca54cf1dd175 --- /dev/null +++ b/net-p2p/litecoin/files/patch-src_crypto_scrypt.cpp @@ -0,0 +1,11 @@ +--- src/crypto/scrypt.cpp.orig 2019-09-19 19:04:21 UTC ++++ src/crypto/scrypt.cpp +@@ -60,6 +60,8 @@ static inline void be32enc(void *pp, uint32_t x) + p[0] = (x >> 24) & 0xff; + } + ++#else ++#include <sys/endian.h> + #endif + typedef struct HMAC_SHA256Context { + SHA256_CTX ictx; |