[MPlayer-matrox] Tiny patch for mga_vid to compile against 2.6.19 kernel

Tamas, Gergely dice at mfa.kfki.hu
Mon Jan 8 19:37:36 CET 2007


Hi,

 > Below is a tiny patch for mga_vid.c to compile against a 2.6.19 kernel.
 > 
 > --<CUT>---
 > --- mga_vid-2.6.18/mga_vid.c    2006-09-27 18:32:13.000000000 +0200
 > +++ mga_vid-2.6.19/mga_vid.c    2007-01-07 23:24:17.000000000 +0100
 > @@ -42,7 +42,7 @@
 > //use the 'major' parameter to override the default major number (83)
 > /* mknod /dev/mga_vid c 83 0 */
 > 
 > -#include <linux/config.h>
 > +#include <linux/autoconf.h>
 > #include <linux/version.h>
 > #include <linux/module.h>
 > #include <linux/moduleparam.h>
 > --<CUT>---

Why do you need 'linux/autoconf.h' ?

[dice at neptune ~]$ cat /usr/include/linux/autoconf.h
#include <linux/err_kernel_only.h>

Simply comment out the 'linux/config.h' line.

What about something like :

--- <<< --- <<< --- <<< ---
Index: mga_vid.c
===================================================================
--- mga_vid.c	(revision 250)
+++ mga_vid.c	(working copy)
@@ -42,8 +42,12 @@
 //use the 'major' parameter to override the default major number (83)
 /* mknod /dev/mga_vid c 83 0 */
 
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
 #include <linux/config.h>
-#include <linux/version.h>
+#endif
+
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/kobject.h>
--- <<< --- <<< --- <<< ---

Gergely



More information about the MPlayer-matrox mailing list