Re: 2.2.18-3 seems to break pcmcia-cs-3.1.20

From: Marcelo Tosatti (marcelo@conectiva.com.br)
Date: Tue Sep 05 2000 - 11:11:36 EST


On Tue, 5 Sep 2000 glouis@dynamicro.on.ca wrote:

> # make all
> make[1]: Entering directory /usr/src/pcmcia-cs-3.1.20/modules'
> cc -MD -O2 -Wall -Wstrict-prototypes -pipe -I../include
> -I/usr/src/linux/include -D__KERNEL__ -DMODULE -c cs.c
> In file included from /usr/src/linux/include/linux/fs.h:12,

Thats because 2.2.18pre3 has a 2.4 "compatibility layer".

The attached patch fixes the problem.

diff -Nur pcmcia-cs-3.1.20.orig/include/pcmcia/k_compat.h pcmcia-cs-3.1.20/include/pcmcia/k_compat.h
--- pcmcia-cs-3.1.20.orig/include/pcmcia/k_compat.h Tue Sep 5 15:57:21 2000
+++ pcmcia-cs-3.1.20/include/pcmcia/k_compat.h Tue Sep 5 16:07:30 2000
@@ -55,7 +55,7 @@
 #define DEV_ID dev_id
 #define IRQ_MAP(irq, dev) do { } while (0)
 
-#if (LINUX_VERSION_CODE < VERSION(2,3,1))
+#if (LINUX_VERSION_CODE < VERSION(2,3,1)) && (LINUX_VERSION_CODE < VERSION(2,2,18))
 #if (LINUX_VERSION_CODE < VERSION(2,0,16))
 #define init_waitqueue_head(p) (*(p) = NULL)
 #else
@@ -162,10 +162,10 @@
 #define mdelay(x) { int i; for (i=0;i<x;i++) udelay(1000); }
 #endif
 
-#if (LINUX_VERSION_CODE < VERSION(2,1,0))
+#if (LINUX_VERSION_CODE < VERSION(2,1,0))
 #define __set_current_state(n) \
     do { current->state = TASK_INTERRUPTIBLE; } while (0)
-#elif (LINUX_VERSION_CODE < VERSION(2,3,16))
+#elif (LINUX_VERSION_CODE < VERSION(2,3,16)) && (LINUX_VERSION_CODE < VERSION(2,2,18))
 #define __set_current_state(n) do { current->state = (n); } while (0)
 #endif
 
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 21:00:23 EST