Skip to content

Commit

Permalink
Add macos/freebsd missing endian.h include and add win endianness info
Browse files Browse the repository at this point in the history
  • Loading branch information
qiukeren authored and est31 committed Dec 29, 2015
1 parent 1735c20 commit 848b050
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/util/serialize.h
Expand Up @@ -26,7 +26,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,

#include "config.h"
#if HAVE_ENDIAN_H
#include <endian.h>
#ifdef _WIN32
#define __BYTE_ORDER 0
#define __LITTLE_ENDIAN 0
#define __BIG_ENDIAN 1
#elif defined(__MACH__) && defined(__APPLE__)
#include <machine/endian.h>
#elif defined(__FreeBSD__)
#include <sys/endian.h>
#else
#include <endian.h>
#endif
#endif
#include <string.h> // for memcpy
#include <iostream>
Expand Down

0 comments on commit 848b050

Please sign in to comment.