Skip to content
Snippets Groups Projects
Commit 9f10d7df authored by Oleg Hahm's avatar Oleg Hahm
Browse files

check for __BIG_ENDIAN__ rather than for __BYTE_ORDER__ and include board.h

parent b0d51d32
No related branches found
No related tags found
No related merge requests found
...@@ -44,15 +44,16 @@ ...@@ -44,15 +44,16 @@
#include <string.h> #include <string.h>
#include "crypto/sha256.h" #include "crypto/sha256.h"
#include "board.h"
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #ifdef __BIG_ENDIAN__
/* Copy a vector of big-endian uint32_t into a vector of bytes */ /* Copy a vector of big-endian uint32_t into a vector of bytes */
#define be32enc_vect memcpy #define be32enc_vect memcpy
/* Copy a vector of bytes into a vector of big-endian uint32_t */ /* Copy a vector of bytes into a vector of big-endian uint32_t */
#define be32dec_vect memcpy #define be32dec_vect memcpy
#else /* __BYTE_ORDER__ != __ORDER_BIG_ENDIAN__ */ #else /* !__BIG_ENDIAN__ */
/* /*
* Encode a length len/4 vector of (uint32_t) into a length len vector of * Encode a length len/4 vector of (uint32_t) into a length len vector of
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment