Hello Laurent, > On Thu, Jul 17, 2008 at 11:04 PM, Laurent Pinchart > <[EMAIL PROTECTED]> wrote: >> On Thursday 17 July 2008, Niels de Vos wrote: >>> Hello, >>> >>> the attached patch fixes compile issues on kernel 2.6.18 (Red Hat >>> Enterprise, CentOS). >> But it breaks compilation on non-Red Hat 2.6.18 kernels. Red Hat ships lots >> of >> backported patches with its kernels. In this case the fault is on Red Hat's >> side.
The attached patch should fix it. It makes the check in two stages, circumventing the use of an undefined macro-function. Tested on several CentOS releases, including the old 5.0 without RHEL_*-macros. Thanks again, Niels
Index: uvc_compat.h
===================================================================
--- uvc_compat.h (revision 232)
+++ uvc_compat.h (working copy)
@@ -263,6 +263,15 @@
*
* Included in Linux 2.6.19
*/
+
+/* Red Hat Enterprise Linux 5.2 contains heavy backports, make an excepion */
+#ifdef RHEL_RELEASE_CODE
+#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(5,2)
+/* we're on RHEL 5.2 or newer with backported usb_endpoint_*()-functions */
+#define HAS_BACKPORTED_USB_EP
+#endif
+#endif
+#ifndef HAS_BACKPORTED_USB_EP
static inline int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd)
{
return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN);
@@ -290,6 +299,7 @@
{
return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd));
}
+#endif /* !HAS_BACKPORTED_USB_EP */
/*
* USB auto suspend
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Linux-uvc-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
