diff options
author | Eric Sandall | 2011-05-12 14:51:30 -0700 |
---|---|---|
committer | Eric Sandall | 2011-05-12 14:51:51 -0700 |
commit | 2d0979298f05e5a24cd981cbb81347c5ed81d955 (patch) | |
tree | 734bf782844fc4b4bfae19406d7582807ea73c63 | |
parent | 4c08af9cd98d3ed781b28d22dd4e47d5b7549607 (diff) |
hal: Fix compilation with linux 2.6.38+ headers
See https://bugs.launchpad.net/ubuntu/+source/hal/+bug/721399
-rw-r--r-- | utils/hal/HISTORY | 5 | ||||
-rwxr-xr-x | utils/hal/PRE_BUILD | 3 | ||||
-rw-r--r-- | utils/hal/linux-2.6.38-v4l.patch | 45 |
3 files changed, 53 insertions, 0 deletions
diff --git a/utils/hal/HISTORY b/utils/hal/HISTORY index 4b8867f750..aedd101500 100644 --- a/utils/hal/HISTORY +++ b/utils/hal/HISTORY @@ -1,3 +1,8 @@ +2011-05-12 Eric Sandall <sandalle@sourcemage.org> + * PRE_BUILD: Apply linux-2.6.38-v4l.patch + * linux-2.6.38-v4l.patch: Fix compilation with linux 2.6.38+ headers + See https://bugs.launchpad.net/ubuntu/+source/hal/+bug/721399 + 2011-01-09 Vlad Glagolev <stealth@sourcemage.org> * DEPENDS: removed libcap as a required dep diff --git a/utils/hal/PRE_BUILD b/utils/hal/PRE_BUILD index 0a2ed389be..bf0c4dcc4a 100755 --- a/utils/hal/PRE_BUILD +++ b/utils/hal/PRE_BUILD @@ -1,6 +1,9 @@ default_pre_build && cd "$SOURCE_DIRECTORY" && +message "${MESSAGE_COLOR}Apply Linux 2.6.38+ headers patch...${DEFAULT_COLOR}" && +patch -p1 < "${SPELL_DIRECTORY}"/linux-2.6.38-v4l.patch && + if [[ $HAL_VER == devel ]]; then NOCONFIGURE=1 ./autogen.sh fi diff --git a/utils/hal/linux-2.6.38-v4l.patch b/utils/hal/linux-2.6.38-v4l.patch new file mode 100644 index 0000000000..077f73adec --- /dev/null +++ b/utils/hal/linux-2.6.38-v4l.patch @@ -0,0 +1,45 @@ +# From http://cgit.freedesktop.org/hal/commit/?id=ae13d96fa2a0612b6000f4b8f6ed9d3564035703 +# to better fix https://bugs.launchpad.net/ubuntu/+source/hal/+bug/721399 +diff --git a/hald/linux/probing/probe-video4linux.c b/hald/linux/probing/probe-video4linux.c +index 7bc13e8..b055720 100644 +--- a/hald/linux/probing/probe-video4linux.c ++++ b/hald/linux/probing/probe-video4linux.c +@@ -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 @@ main (int argc, char *argv[]) + 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; +@@ -107,7 +111,9 @@ main (int argc, char *argv[]) + 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) { +@@ -134,6 +140,7 @@ main (int argc, char *argv[]) + HAL_DEBUG (("ioctl VIDIOCGCAP failed")); + } + } ++#endif + + LIBHAL_FREE_DBUS_ERROR (&error); + libhal_device_commit_changeset (ctx, cset, &error); |