summaryrefslogtreecommitdiffstats
path: root/multimedia/ffmpeg045/files/patch-libavcodec::bswap.h
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/ffmpeg045/files/patch-libavcodec::bswap.h')
-rw-r--r--multimedia/ffmpeg045/files/patch-libavcodec::bswap.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/multimedia/ffmpeg045/files/patch-libavcodec::bswap.h b/multimedia/ffmpeg045/files/patch-libavcodec::bswap.h
new file mode 100644
index 0000000..e0c419c
--- /dev/null
+++ b/multimedia/ffmpeg045/files/patch-libavcodec::bswap.h
@@ -0,0 +1,41 @@
+--- libavcodec/bswap.h.orig Sun Nov 3 04:51:51 2002
++++ libavcodec/bswap.h Sun Nov 3 04:53:30 2002
+@@ -5,6 +5,14 @@
+ #include <byteswap.h>
+ #else
+
++#if (defined(BSD) && (BSD >= 199103))
++#include <sys/param.h>
++#endif
++
++#if defined(__FreeBSD__) && __FreeBSD_version >= 470000
++#include <sys/endian.h>
++#endif
++
+ #ifdef ARCH_X86
+ inline static unsigned short ByteSwap16(unsigned short x)
+ {
+@@ -13,7 +21,11 @@
+ "0" (x));
+ return x;
+ }
++#if defined(__FreeBSD__) && __FreeBSD_version >= 470000
++#define bswap_16(x) (be16toh(x))
++#else
+ #define bswap_16(x) ByteSwap16(x)
++#endif
+
+ inline static unsigned int ByteSwap32(unsigned int x)
+ {
+@@ -29,7 +41,11 @@
+ "0" (x));
+ return x;
+ }
++#if defined(__FreeBSD__) && __FreeBSD_version >= 470000
++#define bswap_32(x) (be32toh(x))
++#else
+ #define bswap_32(x) ByteSwap32(x)
++#endif
+
+ inline static unsigned long long int ByteSwap64(unsigned long long int x)
+ {
OpenPOWER on IntegriCloud