Set byte order defines when compiled on OSX

Byte order defines have a DARWIN prefix on OSX so the values openbsc
expects are set from their Darwin counterparts when compiled on OSX.
This commit is contained in:
Tobias Engel
2012-10-24 17:53:50 +02:00
committed by Harald Welte
parent 511f9c3e4a
commit aff20717e4
2 changed files with 14 additions and 2 deletions

View File

@@ -42,7 +42,13 @@
#include <limits.h>
#ifndef __BYTE_ORDER
#error "__BYTE_ORDER should be defined by someone"
# ifdef __APPLE__
# define __BYTE_ORDER __DARWIN_BYTE_ORDER
# define __LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN
# define __BIG_ENDIAN __DARWIN_BIG_ENDIAN
# else
# error "__BYTE_ORDER should be defined by someone"
# endif
#endif
/* according to rtp_proxy.c RFC 3550 */

View File

@@ -42,7 +42,13 @@
#include <limits.h>
#ifndef __BYTE_ORDER
#error "__BYTE_ORDER should be defined by someone"
# ifdef __APPLE__
# define __BYTE_ORDER __DARWIN_BYTE_ORDER
# define __LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN
# define __BIG_ENDIAN __DARWIN_BIG_ENDIAN
# else
# error "__BYTE_ORDER should be defined by someone"
# endif
#endif
static LLIST_HEAD(rtp_sockets);