diff options
| author | chromatic <[email protected]> | 2021-08-28 08:52:56 -0700 |
|---|---|---|
| committer | chromatic <[email protected]> | 2021-08-28 08:54:34 -0700 |
| commit | 24d9b1c4e39d9cbf40618df3b8951c0376c79b73 (patch) | |
| tree | b7aaedef35e2db7ccaa148f213196ab52ed3a86c /src | |
| parent | Merge pull request #2483 from bjacquin/dev/beber/db53 (diff) | |
| download | discoin-24d9b1c4e39d9cbf40618df3b8951c0376c79b73.tar.xz discoin-24d9b1c4e39d9cbf40618df3b8951c0376c79b73.zip | |
Fix FreeBSD scrypt compilation
Commit originated in Litecoin PR #416:
https://github.com/litecoin-project/litecoin/pull/416
Note that Dogecoin 1.21-dev has a different scrypt.h file which will
need a similar change, but scrypt is under rework, so this is the
minimal change for 1.14.5 which will get FreeBSD compilation to work
again.
Diffstat (limited to 'src')
| -rw-r--r-- | src/crypto/scrypt.cpp | 2 | ||||
| -rw-r--r-- | src/crypto/scrypt.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/crypto/scrypt.cpp b/src/crypto/scrypt.cpp index da02f5ead..4a04f409d 100644 --- a/src/crypto/scrypt.cpp +++ b/src/crypto/scrypt.cpp @@ -44,6 +44,7 @@ #endif #endif +#ifndef __FreeBSD__ static inline uint32_t be32dec(const void *pp) { const uint8_t *p = (uint8_t const *)pp; @@ -60,6 +61,7 @@ static inline void be32enc(void *pp, uint32_t x) p[0] = (x >> 24) & 0xff; } +#endif /** * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen): * Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and diff --git a/src/crypto/scrypt.h b/src/crypto/scrypt.h index 5431fb67c..8c1158a32 100644 --- a/src/crypto/scrypt.h +++ b/src/crypto/scrypt.h @@ -27,6 +27,7 @@ void PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen); +#ifndef __FreeBSD__ static inline uint32_t le32dec(const void *pp) { const uint8_t *p = (uint8_t const *)pp; @@ -43,3 +44,4 @@ static inline void le32enc(void *pp, uint32_t x) p[3] = (x >> 24) & 0xff; } #endif +#endif |