[vlc-commits] videodev2.h: fixes for non Linux builds

Rafaël Carré git at videolan.org
Thu Sep 6 18:57:37 CEST 2012


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed Sep  5 01:59:27 2012 +0200| [4e2ad6dffd3191c9cecacb1dfe3c2d35b58b4d17] | committer: Rafaël Carré

videodev2.h: fixes for non Linux builds

Signed-off-by: Rafaël Carré <funman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4e2ad6dffd3191c9cecacb1dfe3c2d35b58b4d17
---

 modules/access/v4l2/videodev2.h |   34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/modules/access/v4l2/videodev2.h b/modules/access/v4l2/videodev2.h
index ac00f4c..ddd0cd3 100644
--- a/modules/access/v4l2/videodev2.h
+++ b/modules/access/v4l2/videodev2.h
@@ -58,8 +58,42 @@
 
 #include <sys/time.h>
 
+#ifdef __linux__
 #include <linux/ioctl.h>
 #include <linux/types.h>
+#else
+#include <sys/ioctl.h>
+#ifndef HAVE_LINUX_INTEGER_TYPES
+#ifndef __u64
+typedef uint64_t __u64;
+#endif
+#ifndef __le32
+typedef uint32_t __le32;
+#endif
+#ifndef __u32
+typedef uint32_t __u32;
+#endif
+#ifndef __u16
+typedef uint16_t __u16;
+#endif
+#ifndef __u8
+typedef uint8_t __u8;
+#endif
+
+#ifndef __s64
+typedef int64_t __s64;
+#endif
+#ifndef __s32
+typedef int32_t __s32;
+#endif
+#ifndef __s16
+typedef int16_t __s16;
+#endif
+#ifndef __s8
+typedef int8_t __s8;
+#endif
+#endif
+#endif
 
 /*
  * Common stuff for both V4L1 and V4L2



More information about the vlc-commits mailing list