From 3a4cd1070f64e7941ac9f31651f6823365c6baf8 Mon Sep 17 00:00:00 2001 From: Nagy Karoly Gabriel Date: Thu, 28 Apr 2011 13:58:39 +0200 Subject: [PATCH] udev: added compatibility patch for uclibc and patch to remove deprecated v4l --- filesystem/udev/udev-replace-le16toh.patch | 34 ++++++++++++ filesystem/udev/v4l-remove.patch | 64 ++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 filesystem/udev/udev-replace-le16toh.patch create mode 100644 filesystem/udev/v4l-remove.patch diff --git a/filesystem/udev/udev-replace-le16toh.patch b/filesystem/udev/udev-replace-le16toh.patch new file mode 100644 index 000000000..dbc97b888 --- /dev/null +++ b/filesystem/udev/udev-replace-le16toh.patch @@ -0,0 +1,34 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../udev/udev-replace-le16toh.patch +# Copyright (C) 2011 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +rediffed for our udev version from: +http://lists.linuxtogo.org/pipermail/openembedded-commits/2010-June/047909.html + +--- udev-166/extras/ata_id/ata_id.c.orig 2011-02-09 22:12:15.000000000 +0100 ++++ udev-166/extras/ata_id/ata_id.c 2011-04-27 20:46:08.936000255 +0200 +@@ -331,7 +331,11 @@ + uint16_t *p; + + p = (uint16_t *) identify; +- p[offset_words] = le16toh (p[offset_words]); ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++ p[offset_words] = p[offset_words]; ++#else ++ p[offset_words] = __bswap_16 (p[offset_words]); ++#endif + } + + /** diff --git a/filesystem/udev/v4l-remove.patch b/filesystem/udev/v4l-remove.patch new file mode 100644 index 000000000..7bd9fdc60 --- /dev/null +++ b/filesystem/udev/v4l-remove.patch @@ -0,0 +1,64 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../udev/v4l-remove.patch +# Copyright (C) 2011 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +Submitted By: Matt Burgess +Date: 2011-03-26 +Initial Package Version: 166 +Upstream Status: From upstream +Origin: http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=4ace8a43ac2cbbd4d6f5c29fc461c3caa8f8545b +Description: Fixes a compilation error caused by the removal of the + Video for Linux 1 API from Linux kernels from 2.6.38 + onwards. + +diff -Naur udev-166.orig/extras/v4l_id/v4l_id.c udev-166/extras/v4l_id/v4l_id.c +--- udev-166.orig/extras/v4l_id/v4l_id.c 2009-12-03 12:45:03.000000000 +0000 ++++ udev-166/extras/v4l_id/v4l_id.c 2011-03-25 20:26:33.000000000 +0000 +@@ -28,7 +28,6 @@ + #include + #include + #include +-#include + #include + + int main (int argc, char *argv[]) +@@ -39,7 +38,6 @@ + }; + int fd; + char *device; +- struct video_capability v1cap; + struct v4l2_capability v2cap; + + while (1) { +@@ -82,19 +80,6 @@ + if ((v2cap.capabilities & V4L2_CAP_RADIO) > 0) + printf("radio:"); + printf("\n"); +- } else if (ioctl (fd, VIDIOCGCAP, &v1cap) == 0) { +- printf("ID_V4L_VERSION=1\n"); +- printf("ID_V4L_PRODUCT=%s\n", v1cap.name); +- printf("ID_V4L_CAPABILITIES=:"); +- if ((v1cap.type & VID_TYPE_CAPTURE) > 0) +- printf("capture:"); +- if ((v1cap.type & VID_TYPE_OVERLAY) > 0) +- printf("video_overlay:"); +- if (v1cap.audios > 0) +- printf("audio:"); +- if ((v1cap.type & VID_TYPE_TUNER) > 0) +- printf("tuner:"); +- printf("\n"); + } + + close (fd);