Allow <sys/endian.h> as well as <endian.h>

On FreeBSD, the header which defines htobe64() is the sys/ variant,
unlike Linux.
This commit is contained in:
Benjamin Kaduk
2012-04-05 11:15:21 -04:00
committed by Keith Winstein
parent 89971f7524
commit 424e2b53e1
2 changed files with 11 additions and 2 deletions
+5 -1
View File
@@ -22,7 +22,11 @@
#include "config.h"
#ifdef HAVE_HTOBE64
# include <endian.h>
# if defined(HAVE_ENDIAN_H)
# include <endian.h>
# elif defined(HAVE_SYS_ENDIAN_H)
# include <sys/endian.h>
# endif
#elif HAVE_OSX_SWAP
# include <libkern/OSByteOrder.h>
# define htobe64 OSSwapHostToBigInt64