BSD: Improve compatibility with BSD family operating systems (#137)

This commit is contained in:
Rupert Carmichael 2020-06-08 19:01:16 -04:00 committed by GitHub
parent 4e77e6caef
commit 1dcb3cdbb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -23,6 +23,8 @@ extern const uint32_t Crc32Lookup[MaxSlice][256];
// defines __BYTE_ORDER as __LITTLE_ENDIAN or __BIG_ENDIAN
#if defined(__APPLE__) || defined(HAVE_LIBNX)
#include <machine/endian.h>
#elif defined (__FreeBSD__) || defined(__DragonFly__)
#include <sys/endian.h>
#else
#include <endian.h>
#endif

View file

@ -39,7 +39,7 @@
#include <assert.h>
#include <stdlib.h>
#if !(defined(__MACH__) || defined(__FreeBSD__))
#if !(defined(__MACH__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__))
#include <malloc.h>
#endif