From 8e769c22fb8f772262130bb82f862f377e05f513 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Mon, 13 Feb 2017 15:22:03 +0100 Subject: ipcpd: Fix build on FreeBSD Use labs for absolute value of a long, and defines bswap_64 as the FreeBSD function bswap64. --- include/ouroboros/endian.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/ouroboros/endian.h b/include/ouroboros/endian.h index 745f0c57..a2745595 100644 --- a/include/ouroboros/endian.h +++ b/include/ouroboros/endian.h @@ -114,7 +114,9 @@ static inline uint32_t bswap_32(uint32_t x) { #if defined(__GNUC__) && (__GNUC__ >= 4) && \ (__GNUC__ > 4 || __GNUC_MINOR__ >= 3) #define bswap_64(x) __builtin_bswap64(x) -#elif !defined (bswap64) +#elif defined (bswap64) +#define bswap_64 bswap64 +#else #if !defined(__STRICT_ANSI__) static inline uint64_t bswap_64(uint64_t x) { union { -- cgit v1.2.3