summaryrefslogtreecommitdiff
path: root/lib/common/Box.h
diff options
context:
space:
mode:
authorMartin Ebourne <martin@ebourne.me.uk>2005-12-25 18:28:26 +0000
committerMartin Ebourne <martin@ebourne.me.uk>2005-12-25 18:28:26 +0000
commit814337dedb1462451a32cd8a08555e44a60a33df (patch)
tree644fef4f173fab9b32aaeb649fb1b508fb05a158 /lib/common/Box.h
parent2a8fa1955bef6a50b192a196f53e47f8b9852acb (diff)
Attempt to fix box_ntoh64 for FreeBSD which renames betoh64 to be64toh
Diffstat (limited to 'lib/common/Box.h')
-rw-r--r--lib/common/Box.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/common/Box.h b/lib/common/Box.h
index 326bed38..8ea08074 100644
--- a/lib/common/Box.h
+++ b/lib/common/Box.h
@@ -138,7 +138,11 @@ inline uint64_t box_swap64(uint64_t x)
#ifdef HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
#define box_hton64(x) htobe64(x)
- #define box_ntoh64(x) betoh64(x)
+ #ifdef HAVE_BE64TOH
+ #define box_ntoh64(x) be64toh(x)
+ #else
+ #define box_ntoh64(x) betoh64(x)
+ #endif
#elif HAVE_ASM_BYTEORDER_H
#include <asm/byteorder.h>
#define box_hton64(x) __cpu_to_be64(x)