diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-12 15:39:46 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-12 15:41:03 +0200 |
commit | 3cb287919e69174eca2a7a2cf10ac537d973ee22 (patch) | |
tree | da8391c0fc4bbe5375a2d97f14e5ff94abd28469 /openbsc/src/rtp_proxy.c | |
parent | 88a5fa0a7536138424bad775b1bff083fa9a1c4f (diff) |
misc: Attempt to determine byte order in a cross-platform way
OSX does not provide an endian.h, use the other header files that
should define/include what we need. Also check that the byteorder
define is available.
Diffstat (limited to 'openbsc/src/rtp_proxy.c')
-rw-r--r-- | openbsc/src/rtp_proxy.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/openbsc/src/rtp_proxy.c b/openbsc/src/rtp_proxy.c index 924173dd2..a1f440d09 100644 --- a/openbsc/src/rtp_proxy.c +++ b/openbsc/src/rtp_proxy.c @@ -19,7 +19,6 @@ * */ -#include <endian.h> #include <errno.h> #include <unistd.h> #include <sys/socket.h> @@ -37,6 +36,15 @@ #include <openbsc/debug.h> #include <openbsc/rtp_proxy.h> +/* attempt to determine byte order */ +#include <sys/types.h> +#include <sys/param.h> +#include <limits.h> + +#ifndef __BYTE_ORDER +#error "__BYTE_ORDER should be defined by someone" +#endif + static LLIST_HEAD(rtp_sockets); /* should we mangle the CNAME inside SDES of RTCP packets? We disable |