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:
committed by
Keith Winstein
parent
89971f7524
commit
424e2b53e1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user