From 1a1e631ccd561afdea31e2fb2f4982b3fdc81432 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 10 Jul 2014 00:49:01 +0200 Subject: build: deal with endian mess There is no standard mechanism for detecting endianess. Doing it at compile time in a portable way is probably hard. Doing it properly with a configure check is probably hard too. Using the endian definitions in (usually includes , which is not available everywhere) works under circumstances, but the previous commit broke it on OSX. Ideally all code should be endian dependent, but that is not possible due to the dependencies (such as FFmpeg, some video output APIs, some audio output APIs). Create a header osdep/endian.h, which contains various fallbacks. Note that the last fallback uses libavutil; however, it's not clear whether AV_HAVE_BIGENDIAN is a public symbol, or whether including really makes it visible. And in fact we don't want to pollute the namespace with libavutil definitions either. Thus it's only the last fallback. --- audio/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio') diff --git a/audio/format.h b/audio/format.h index 6821f27ab6..788f4ed1c1 100644 --- a/audio/format.h +++ b/audio/format.h @@ -24,8 +24,8 @@ #define MPLAYER_AF_FORMAT_H #include -#include +#include "osdep/endian.h" #include "bstr/bstr.h" #if BYTE_ORDER == BIG_ENDIAN -- cgit v1.2.3