Next-in-Thread Next Message

Warning cardmgr.c Patch - Linux 2.2.14pre9 patch to /usr/src/linux/include/scsi/scsi.h adds spinlocks 

Forum: PCMCIA driver development
Date: 1999, Nov 27
From: Todd A. Wood tawman

Built a 2.2.14pre9 kernel and had problems compiling pcmcia-cs-3.0.14. Then I grabbed pcmcia-cs-3.1.4 and had the same problem.

This problem did not exist with 2.2.14pre8.

make[1]: Entering directory `/usr/local/src/pcmcia-cs-3.1.4/cardmgr'
cc  -MD -O -Wall -Wstrict-prototypes -pipe -I../include -I/usr/src/linux/include -I../modules -I/usr/X11R6/include -I/usr/X11/include -I/usr/X11R6/include/X11 -c cardmgr.c
In file included from cardmgr.c:201:
/usr/src/linux/include/scsi/scsi.h:21: parse error before `scsi_malloc_lock'
/usr/src/linux/include/scsi/scsi.h:21: warning: data definition has no type or storage class
make[1]: *** [cardmgr.o] Error 1

I took a look at scsi/scsi.h and some other files in the kernel 2.2.14pre9 patch which had spinlocks added. The end result is to modify cardmgr.c and include the proper spinlocks.h file for the kernel version.

Apply the following patch to cardmgr and it will compile with 2.2.14pre9:

# diff -urN cardmgr/cardmgr.c.orig cardmgr/cardmgr.c
--- cardmgr/cardmgr.c.orig	Tue Nov  9 00:37:34 1999
+++ cardmgr/cardmgr.c	Sat Nov 27 23:49:12 1999
@@ -198,8 +198,13 @@
 #ifdef __linux__

 #include 
-#include 
 #define VERSION(v,p,s) (((v)<<16)+(p<<8)+s)
+#if LINUX_VERSION_CODE >= VERSION(2,3,18)
+#include 
+#elif LINUX_VERSION_CODE >= VERSION(2,1,95)
+#include 
+#endif /* version >= 2.1.95 */
+#include 
 #if (LINUX_VERSION_CODE < VERSION(2,1,126))
 #define SCSI_DISK0_MAJOR SCSI_DISK_MAJOR
 #endif

Next-in-Thread Next Message

Messages Inline: 1 All Outline: 1 2 All

1. None This is really a bug in the header, not in PCMCIA by David Hinds, 1999, Nov 29

Add Message to: "cardmgr.c Patch - Linux 2.2.14pre9 patch to /usr/src/linux/include/scsi/scsi.h adds spinlocks"

Members Subscribe Admin Mode Show Frames Help for HyperNews at pcmcia-cs.sourceforge.net 1.10