mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-02-02 09:54:29 +00:00
Merge pull request #321 from AMDmi3/freebsd-build-fix
Actually include sys/endian.h for le32enc/le32dec on FreeBSD
This commit is contained in:
commit
b5788f7bfa
@ -2,6 +2,9 @@
|
|||||||
#define SCRYPT_H
|
#define SCRYPT_H
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
# include <sys/endian.h>
|
||||||
|
#endif
|
||||||
static const int SCRYPT_SCRATCHPAD_SIZE = 131072 + 63;
|
static const int SCRYPT_SCRATCHPAD_SIZE = 131072 + 63;
|
||||||
|
|
||||||
void scrypt_1024_1_1_256(const char *input, char *output);
|
void scrypt_1024_1_1_256(const char *input, char *output);
|
||||||
@ -18,7 +21,7 @@ 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);
|
size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);
|
||||||
|
|
||||||
# ifndef __FreeBSD__
|
# ifndef __FreeBSD__
|
||||||
/* Allready defined in sys/endian.h */
|
/* Already defined in sys/endian.h */
|
||||||
static inline uint32_t le32dec(const void *pp)
|
static inline uint32_t le32dec(const void *pp)
|
||||||
{
|
{
|
||||||
const uint8_t *p = (uint8_t const *)pp;
|
const uint8_t *p = (uint8_t const *)pp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user