Make portable_endian.h more portable.

Add a minimal amount of stuff so we can compile on Solaris 11.

Fixes (sort of) #191.
This commit is contained in:
Bruce A. Mah 2014-09-19 11:14:29 -07:00
parent 236dcb0b2a
commit 529aeacfd2

View File

@ -64,6 +64,15 @@
# define be64toh(x) betoh64(x)
# define le64toh(x) letoh64(x)
#elif defined(__SunOS)
# include <sys/types.h>
# include <netinet/in.h>
# include <inttypes.h>
# define be64toh(x) ntohll(x)
# define htobe64(x) htonll(x)
#elif defined(__WINDOWS__)
# include <winsock2.h>