Fix building of ORM on FreeBSD (#444)

This commit is contained in:
Vedran Miletić 2020-05-24 18:00:00 +02:00 committed by GitHub
parent 49472a3cc4
commit e286fe869a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -31,10 +31,20 @@
#include <vector>
#ifdef _WIN32
#include <winsock2.h>
#else // some Unix-like OS
#include <arpa/inet.h>
#endif
#if defined __linux__ || defined __FreeBSD__
#ifdef __linux__
#include <endian.h> // __BYTE_ORDER __LITTLE_ENDIAN
#include <endian.h> // __BYTE_ORDER __LITTLE_ENDIAN
#elif defined __FreeBSD__
#include <sys/endian.h> // _BYTE_ORDER _LITTLE_ENDIAN
#define __BYTE_ORDER _BYTE_ORDER
#define __LITTLE_ENDIAN _LITTLE_ENDIAN
#endif
#include <algorithm> // std::reverse()
template <typename T>