freebsd compilation fix (#416)

This commit is contained in:
spl0i7 2018-01-06 14:00:04 +05:30 committed by Adrian Gallagher
parent dfefdeab8f
commit c20788a13e
No known key found for this signature in database
GPG Key ID: FE3348877809386C
2 changed files with 4 additions and 1 deletions

View File

@ -43,7 +43,7 @@
#include <cpuid.h>
#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;

View File

@ -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