summaryrefslogtreecommitdiffstats
path: root/lib/sha256.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-04-27 03:46:10 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-04-27 03:46:10 +0200
commitba0cb3fe960d8653cbbc2358f4e392417af4d98a (patch)
tree46b09279e6987c79a0e6861142cafcaacd1ec9e5 /lib/sha256.c
parentlib: Fix some *bsd build issues introduced by EIGRP code (diff)
downloadfrr-ba0cb3fe960d8653cbbc2358f4e392417af4d98a.tar.xz
frr-ba0cb3fe960d8653cbbc2358f4e392417af4d98a.zip
lib: Fix compilation of some be32* code
The be32dec and be32enc functions are available on some platforms and not others. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/sha256.c')
-rw-r--r--lib/sha256.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sha256.c b/lib/sha256.c
index 4a933875f..a0c6eac42 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -27,7 +27,7 @@
#include <zebra.h>
#include "sha256.h"
-#ifdef GNU_LINUX
+#if !HAVE_DECL_BE32DEC
static inline uint32_t
be32dec(const void *pp)
{
@@ -36,7 +36,9 @@ be32dec(const void *pp)
return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) +
((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24));
}
+#endif
+#if !HAVE_DECL_BE32ENC
static inline void
be32enc(void *pp, uint32_t x)
{