summaryrefslogtreecommitdiff
path: root/recipes/libdv/0013-Fix-endianess-detection-with-mingw-w64.patch
blob: d86c17b83755d5c2d132688620fbabdbe516b69f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From 8cfd142e093f8dc90827a22e98abb92ee061f604 Mon Sep 17 00:00:00 2001
From: Andoni Morales Alastruey <ylatuya@gmail.com>
Date: Mon, 8 Apr 2013 12:34:34 +0200
Subject: [PATCH 13/14] Fix endianess detection with mingw-w64

---
 configure.ac      | 2 +-
 libdv/YUY2.c      | 2 ++
 libdv/bitstream.h | 2 ++
 libdv/dv_types.h  | 2 ++
 4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index ba4c3f2..4729b0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -231,7 +231,7 @@ dnl Checks for header files.
 AC_PATH_X
 AC_HEADER_STDC
 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h linux/videodev.h sys/soundcard.h \
-endian.h machine/endian.h inttypes.h)
+endian.h machine/endian.h sys/param.h inttypes.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
diff --git a/libdv/YUY2.c b/libdv/YUY2.c
index 20b7513..d0d73b1 100644
--- a/libdv/YUY2.c
+++ b/libdv/YUY2.c
@@ -35,6 +35,8 @@
 #include <endian.h>
 #elif HAVE_MACHINE_ENDIAN_H
 #include <machine/endian.h>
+#elif HAVE_SYS_PARAM_H
+#include <sys/param.h>
 #endif
 #include <stdlib.h>
 
diff --git a/libdv/bitstream.h b/libdv/bitstream.h
index 25f4ae9..478364a 100644
--- a/libdv/bitstream.h
+++ b/libdv/bitstream.h
@@ -36,6 +36,8 @@
 #include <endian.h>
 #elif HAVE_MACHINE_ENDIAN_H
 #include <machine/endian.h>
+#elif HAVE_SYS_PARAM_H
+#include <sys/param.h>
 #endif
 
 #ifdef __cplusplus
diff --git a/libdv/dv_types.h b/libdv/dv_types.h
index 1f90561..efa8960 100644
--- a/libdv/dv_types.h
+++ b/libdv/dv_types.h
@@ -42,6 +42,8 @@
 #include <endian.h>
 #elif HAVE_MACHINE_ENDIAN_H
 #include <machine/endian.h>
+#elif HAVE_SYS_PARAM_H
+#include <sys/param.h>
 #endif
 
 /* please tell me these are defined somewhere standard??? */
-- 
2.1.4