[PATCH] compile problem with v4l-dvb in kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm not totally clear on the relationship between the mercurial repository
and the kernel, so maybe this just doesn't make sense at all.

videodev2.h uses KERNEL_VERSION(), but doesn't include linux/version.h where
that macro is defined.  All the dvb-v4l code happens to include
linux/version.h before it includes videodev2.h, so this doesn't cause a
problem there.  Other kernel code, such as the matroxfb driver, does include
videodev2.h without linux/version.h, and so won't compile without this change.

It seems like normally header files are responsible for including other
headers they need for types and macros, and so the change should be to
videodev2.h and not to matroxfb and whereever else needed.
# HG changeset patch
# User xyzzy@xxxxxxxxxxxxxxxxxxx
# Node ID a599a86707d7a5fbbd9d19e612f0ae7d12d54daf
# Parent  ebe0d180ea24a7786614d00ac8184e920fc96ab3
videodev2.h needs linux/version.h

From: Trent Piepho <xyzzy@xxxxxxxxxxxxx>

videodev2.h uses KERNEL_VERSION(), but doesn't include linux/version.h where
that macro is defined.  All the dvb-v4l code happens to include
linux/version.h before it includes videodev2.h, so this doesn't cause a
problem there.  Other kernel code, such as the matroxfb driver, does include
videodev2.h without linux/version.h, and so won't compile without this change.

Signed-off-by: Trent Piepho <xyzzy@xxxxxxxxxxxxx>

diff -r ebe0d180ea24 -r a599a86707d7 linux/include/linux/videodev2.h
--- a/linux/include/linux/videodev2.h	Wed Mar 29 16:11:45 2006 -0800
+++ b/linux/include/linux/videodev2.h	Wed Mar 29 16:27:16 2006 -0800
@@ -16,6 +16,7 @@
 #ifdef __KERNEL__
 #include <linux/time.h> /* need struct timeval */
 #include <linux/poll.h>
+#include <linux/version.h>
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69)
 #include <linux/devfs_fs_kernel.h>
 #endif
_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux