diff --git a/common/platforms/platform_unix.h b/common/platforms/platform_unix.h index 50f69e941..20e4f2f04 100644 --- a/common/platforms/platform_unix.h +++ b/common/platforms/platform_unix.h @@ -51,13 +51,24 @@ #include #include +#ifdef __APPLE__ +#include +#ifndef BYTE_ORDER +#define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN +#define BIG_ENDIAN __DARWIN_BIG_ENDIAN +#define PDP_ENDIAN __DARWIN_PDP_ENDIAN +#define BYTE_ORDER __DARWIN_BYTE_ORDER +#endif +#endif + /* * osx correctly avoids defining strtoll when compiling in strict ansi mode. * c++ 11 standard defines strtoll as well. * We require strtoll, and if your embedded pre-c99 compiler lacks one, please * implement a shim. */ -#if !(defined(__cplusplus) && __cplusplus >= 201103L) && !(defined(__DARWIN_C_LEVEL) && __DARWIN_C_LEVEL >= 200809L) +#if !(defined(__cplusplus) && __cplusplus >= 201103L) && \ + !(defined(__DARWIN_C_LEVEL) && __DARWIN_C_LEVEL >= 200809L) long long strtoll(const char *, char **, int); #endif diff --git a/mongoose/mongoose.h b/mongoose/mongoose.h index 7f1ecb0a5..ae34e7810 100644 --- a/mongoose/mongoose.h +++ b/mongoose/mongoose.h @@ -342,13 +342,24 @@ typedef struct _stati64 cs_stat_t; #include #include +#ifdef __APPLE__ +#include +#ifndef BYTE_ORDER +#define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN +#define BIG_ENDIAN __DARWIN_BIG_ENDIAN +#define PDP_ENDIAN __DARWIN_PDP_ENDIAN +#define BYTE_ORDER __DARWIN_BYTE_ORDER +#endif +#endif + /* * osx correctly avoids defining strtoll when compiling in strict ansi mode. * c++ 11 standard defines strtoll as well. * We require strtoll, and if your embedded pre-c99 compiler lacks one, please * implement a shim. */ -#if !(defined(__cplusplus) && __cplusplus >= 201103L) && !(defined(__DARWIN_C_LEVEL) && __DARWIN_C_LEVEL >= 200809L) +#if !(defined(__cplusplus) && __cplusplus >= 201103L) && \ + !(defined(__DARWIN_C_LEVEL) && __DARWIN_C_LEVEL >= 200809L) long long strtoll(const char *, char **, int); #endif diff --git a/v7/v7.c b/v7/v7.c index 629eaa833..cbdec1f7b 100644 --- a/v7/v7.c +++ b/v7/v7.c @@ -338,13 +338,24 @@ typedef struct _stati64 cs_stat_t; #include #include +#ifdef __APPLE__ +#include +#ifndef BYTE_ORDER +#define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN +#define BIG_ENDIAN __DARWIN_BIG_ENDIAN +#define PDP_ENDIAN __DARWIN_PDP_ENDIAN +#define BYTE_ORDER __DARWIN_BYTE_ORDER +#endif +#endif + /* * osx correctly avoids defining strtoll when compiling in strict ansi mode. * c++ 11 standard defines strtoll as well. * We require strtoll, and if your embedded pre-c99 compiler lacks one, please * implement a shim. */ -#if !(defined(__cplusplus) && __cplusplus >= 201103L) && !(defined(__DARWIN_C_LEVEL) && __DARWIN_C_LEVEL >= 200809L) +#if !(defined(__cplusplus) && __cplusplus >= 201103L) && \ + !(defined(__DARWIN_C_LEVEL) && __DARWIN_C_LEVEL >= 200809L) long long strtoll(const char *, char **, int); #endif