[Pkg-mol-devel] Bug#400481: mol-source doesn't build against 2.6.19
Elimar Riesebieter
riesebie at lxtec.de
Sun Nov 26 14:25:26 CET 2006
Package: mol-source
Version: 0.9.71.dfsg-4
Severity: important
Tags: patch
Please find attatched patch, which will enable mol-source to build
against 2.6.19 as well as the older ones.
Elimar
--
Experience is something you don't get until
just after you need it!
-------------- next part --------------
diff -ur mol~/src/kmod/Linux/archinclude.h mol/src/kmod/Linux/archinclude.h
--- mol~/src/kmod/Linux/archinclude.h 2006-10-07 17:57:59.000000000 +0200
+++ mol/src/kmod/Linux/archinclude.h 2006-10-14 21:00:13.000000000 +0200
@@ -24,9 +24,18 @@
#include "mol_config.h"
#include "kconfig.h"
-#include <linux/config.h>
#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+#include <linux/utsrelease.h>
+#endif
+
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
+#include <linux/config.h>
+#else
+#include <linux/autoconf.h>
+#endif
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#define LINUX_26
#endif
diff -ur mol~/src/kmod/Linux/dev.c mol/src/kmod/Linux/dev.c
--- mol~/src/kmod/Linux/dev.c 2006-10-07 17:57:59.000000000 +0200
+++ mol/src/kmod/Linux/dev.c 2006-10-14 21:00:13.000000000 +0200
@@ -15,7 +15,6 @@
*/
#include "archinclude.h"
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/miscdevice.h>
#include <linux/spinlock.h>
diff -ur mol~/src/kmod/Linux/kuname.c mol/src/kmod/Linux/kuname.c
--- mo~/src/kmod/Linux/kuname.c 2006-10-07 17:57:59.000000000 +0200
+++ mol/src/kmod/Linux/kuname.c 2006-10-14 21:00:13.000000000 +0200
@@ -14,12 +14,18 @@
*
*/
-#include <linux/config.h>
#include <linux/version.h>
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
#include <linux/utsrelease.h>
#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
+#include <linux/config.h>
+#else
+#include <linux/autoconf.h>
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
#ifdef CONFIG_SMP
diff -ur mol~/src/netdriver/kuname.c mol/src/netdriver/kuname.c
--- mol~/src/netdriver/kuname.c 2006-10-07 17:57:59.000000000 +0200
+++ mol/src/netdriver/kuname.c 2006-10-14 21:00:13.000000000 +0200
@@ -14,12 +14,18 @@
*
*/
-#include <linux/config.h>
#include <linux/version.h>
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
#include <linux/utsrelease.h>
#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
+#include <linux/config.h>
+#else
+#include <linux/autoconf.h>
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
#ifdef CONFIG_SMP
More information about the Pkg-mol-devel
mailing list