summaryrefslogtreecommitdiff
path: root/graphics/libv4l/patches/patch-aa
blob: 69fbac3e64bdda327a50944ce253c4c6209427b8 (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
$NetBSD: patch-aa,v 1.5 2015/01/18 05:57:25 dholland Exp $

- support platforms other than linux

--- include/libv4lconvert.h.orig	2008-08-26 12:32:39.000000000 +0000
+++ include/libv4lconvert.h
@@ -22,10 +22,22 @@
 /* These headers are not needed by us, but by linux/videodev2.h,
    which is broken on some systems and doesn't include them itself :( */
 #include <sys/time.h>
+#ifdef __linux__
 #include <linux/types.h>
 #include <linux/ioctl.h>
 /* end broken header workaround includes */
 #include <linux/videodev2.h>
+#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__sun)
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#if defined(__sun)
+#include <sys/videodev2.h>
+#else
+#include <sys/videoio.h>
+#endif
+#else
+#error "I don't know how to find the v4l headers on this platform"
+#endif
 
 #ifdef __cplusplus
 extern "C" {