summaryrefslogtreecommitdiff
path: root/sysutils/hal/patches/patch-nd
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/hal/patches/patch-nd')
-rw-r--r--sysutils/hal/patches/patch-nd47
1 files changed, 47 insertions, 0 deletions
diff --git a/sysutils/hal/patches/patch-nd b/sysutils/hal/patches/patch-nd
new file mode 100644
index 00000000000..b479b3b5acd
--- /dev/null
+++ b/sysutils/hal/patches/patch-nd
@@ -0,0 +1,47 @@
+$NetBSD: patch-nd,v 1.3 2011/10/04 10:31:37 dsainty Exp $
+
+Upstream patch to build on Linux systems without V4L1 support.
+
+http://cgit.freedesktop.org/hal/commit/?id=ae13d96fa2a0612b6000f4b8f6ed9d3564035703
+
+--- hald/linux/probing/probe-video4linux.c.orig 2009-08-25 00:42:30.000000000 +1200
++++ hald/linux/probing/probe-video4linux.c 2011-10-04 23:15:50.132307906 +1300
+@@ -30,7 +30,9 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/ioctl.h>
++#ifdef HAVE_LINUX_VIDEODEV_H
+ #include <linux/videodev.h>
++#endif
+ #include <linux/videodev2.h>
+ #include <errno.h>
+ #include <fcntl.h>
+@@ -50,7 +52,9 @@
+ int ret = -1;
+ char *udi;
+ char *device_file;
++#ifdef HAVE_LINUX_VIDEODEV_H
+ struct video_capability v1cap;
++#endif
+ struct v4l2_capability v2cap;
+ LibHalContext *ctx = NULL;
+ LibHalChangeSet *cset;
+@@ -106,7 +110,9 @@
+ LIBHAL_FREE_DBUS_ERROR (&error);
+ libhal_device_add_capability (ctx, udi, "video4linux.radio", &error);
+ }
+- } else {
++ }
++#ifdef HAVE_LINUX_VIDEODEV_H
++ else {
+ HAL_DEBUG (("ioctl VIDIOC_QUERYCAP failed"));
+
+ if (ioctl (fd, VIDIOCGCAP, &v1cap) == 0) {
+@@ -133,6 +139,7 @@
+ HAL_DEBUG (("ioctl VIDIOCGCAP failed"));
+ }
+ }
++#endif
+
+ LIBHAL_FREE_DBUS_ERROR (&error);
+ libhal_device_commit_changeset (ctx, cset, &error);