From c20788a13edbc4702f624a6ce680dce6e0d2771b Mon Sep 17 00:00:00 2001 From: spl0i7 Date: Sat, 6 Jan 2018 14:00:04 +0530 Subject: [PATCH] freebsd compilation fix (#416) --- src/crypto/scrypt.cpp | 3 ++- src/crypto/scrypt.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/crypto/scrypt.cpp b/src/crypto/scrypt.cpp index 9da803f67..c3a8d5653 100644 --- a/src/crypto/scrypt.cpp +++ b/src/crypto/scrypt.cpp @@ -43,7 +43,7 @@ #include #endif #endif - +#ifndef __FreeBSD__ static inline uint32_t be32dec(const void *pp) { const uint8_t *p = (uint8_t const *)pp; @@ -60,6 +60,7 @@ static inline void be32enc(void *pp, uint32_t x) p[0] = (x >> 24) & 0xff; } +#endif typedef struct HMAC_SHA256Context { SHA256_CTX ictx; SHA256_CTX octx; diff --git a/src/crypto/scrypt.h b/src/crypto/scrypt.h index bcf9dc60f..81f4dd2a9 100644 --- a/src/crypto/scrypt.h +++ b/src/crypto/scrypt.h @@ -28,6 +28,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; @@ -44,3 +45,4 @@ static inline void le32enc(void *pp, uint32_t x) p[3] = (x >> 24) & 0xff; } #endif +#endif