1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

Fix endian detection on non-linux systems

f975f73640 introduced inclusion of endian.h,
which is not a standard header. Only include it on Linux machines and
add similar includes for Apple and FreeBSD.
This commit is contained in:
Patrick Gansterer 2014-02-26 19:21:40 +01:00 committed by Andy Green
parent 2ff6955046
commit b37bd6ce5c

View file

@ -63,7 +63,14 @@ typedef unsigned __int64 u_int64_t;
#include <sys/stat.h>
#include <sys/cdefs.h>
#include <sys/time.h>
#if defined(__APPLE__)
#include <machine/endian.h>
#elif defined(__FreeBSD__)
#include <sys/endian.h>
#elif defined(__linux__)
#include <endian.h>
#endif
#if !defined(BYTE_ORDER)
# define BYTE_ORDER __BYTE_ORDER