[vlc-devel] [PATCH] videodev2.h: fixes for non Linux builds
Rafaël Carré
funman at videolan.org
Wed Sep 5 02:00:27 CEST 2012
---
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
--
1.7.10.4
More information about the vlc-devel
mailing list