Skip to contentSkip to conversation

the latest MTD code from CVS has compilation errors

DISCUSSION Xiaogeng (Shawn) Jin 2 participants 2 messages Aug 29, 2002 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi,

I tried to compile the latest MTD code got from CVS tree on linux 2.4.4 (from DENX). When fs/jffs2/background.c is compiled, it complains that
background.c:108: arguments given to macro 'recalc_sigpending'
background.c:155: arguments given to macro 'recalc_sigpending'
errors. I looked into the code and included header file. In linux/mtd/compatmac.h the macro is re-defined to have no arguments at all if kernel version < 2.5.5. So in my case 108 and 155 should be changed to have no arguments.

Anybody reported this "bug" before?

- Shawn.

PS: compatmac.h's modification date is 2002/08/07, version v1.39.

#1 lore raw

I have the same problem with 2.4.18. See post a few days ago about DOC2000.

A closer look at the problem inticates the problem is not the CVS sources but the patchin.sh script used to apply them to the kernel tree. It does not apply the new jffs2 sources to the kernel tree, crashing the old jffs2 code by replacing mtd headers..

However, applying the new code to stock 2.4.18 does not work either due to a missing include/linux/crc32.h (is in fs/jffs2/crc32.h)

Attached is a small patch to the patchin.sh script to have the new jffs2 code applied to the kernel tree.

Regards
Henrik

Quoted 13 lines · Xiaogeng (Shawn) Jin

Hi,

I tried to compile the latest MTD code got from CVS tree on linux 2.4.4 (from DENX). When fs/jffs2/background.c is compiled, it complains that background.c:108: arguments given to macro 'recalc_sigpending' background.c:155: arguments given to macro 'recalc_sigpending' errors. I looked into the code and included header file. In linux/mtd/compatmac.h the macro is re-defined to have no arguments at all if kernel version < 2.5.5. So in my case 108 and 155 should be changed to have no arguments.

Anybody reported this "bug" before?

Quoted 8 lines

- Shawn.

PS: compatmac.h's modification date is 2002/08/07, version v1.39.

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Index: patches/patchin.sh
===================================================================
RCS file: /home/cvs/mtd/patches/patchin.sh,v
retrieving revision 1.6

patchin.sh +7 -0
diff -u -r1.6 patchin.sh
@@ -30,6 +30,7 @@
 mkdir -p drivers/mtd/nand
 mkdir -p include/linux/mtd
 mkdir -p fs/jffs
+mkdir -p fs/jffs2
 ln -sf $TOPDIR/drivers/mtd/*.[ch] drivers/mtd
 ln -sf $TOPDIR/drivers/mtd/*akefile $TOPDIR/drivers/mtd/Rules.make $TOPDIR/drivers/mtd/Config.in drivers/mtd
 ln -sf $TOPDIR/drivers/mtd/chips/*.[ch] drivers/mtd/chips
@@ -43,7 +44,13 @@
 ln -sf $TOPDIR/fs/jffs/*.[ch] fs/jffs
 ln -sf $TOPDIR/fs/jffs/*akefile fs/jffs
 ln -sf $TOPDIR/include/linux/jffs.h include/linux
+ln -sf $TOPDIR/fs/jffs2/*.[ch] fs/jffs2
+ln -sf $TOPDIR/fs/jffs2/*akefile fs/jffs2
+ln -sf $TOPDIR/include/linux/jffs2*.h include/linux
+ln -sf $TOPDIR/include/linux/z*.h include/linux
+ln -sf $TOPDIR/fs/jffs2/crc32.h include/linux
 ln -sf $TOPDIR/include/linux/mtd/*.h include/linux/mtd
+
 
 #
 #	kernel patches