I find it hard to believe that I'm the first one to find this, but I don't
remember seeing anyone else complain about this.  So, here goes...

I was trying to compile linux-2.4.21 with the following patches from the
developerWorks site:
linux-2.4.21-s390-june2003.diff
linux-2.4.21-s390-01-june2003.diff
linux-2.4.21-s390-02-june2003.diff
linux-2.4.21-s390-03-june2003.diff
linux-2.4.21-s390-04-june2003.diff
linux-2.4.21-s390-kerntypes-june2003.diff
linux-2.4.21-s390-timer-01-june2003.diff

When I did, I got this error on drivers/s390/char/ctrlchar.c:
gcc -D__KERNEL__ -I/usr/src/linux-2.4.21/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer
-pipe -fno-strength-reduce   -nostdinc -iwithprefix
include -DKBUILD_BASENAME=ctrlchar  -c -o ctrlchar.o ctrlchar.c
In file included from ctrlchar.c:12:
/usr/src/linux-2.4.21/include/linux/sysrq.h: In function `__reterr':
/usr/src/linux-2.4.21/include/linux/sysrq.h:97: error: `EINVAL' undeclared
(first use in this function)
/usr/src/linux-2.4.21/include/linux/sysrq.h:97: error: (Each undeclared
identifier is reported only once
/usr/src/linux-2.4.21/include/linux/sysrq.h:97: error: for each function it
appears in.)
make[3]: *** [ctrlchar.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.4.21/drivers/s390/char'


I backed out all the patches and started applying them one at a time.  I
discovered that after linux-2.4.21-s390-01-june2003.diff, the error started.
It looks like a fairly significant change to ctrlchar.c was made in that
code drop, and now sysrq.h is being included before whatever file pulls in
linux/errno.h.  Adding "#include <linux/errno.h>" just before the "#include
<linux/sysrq.h>" line allows compilation to proceed, but I am completely
unsure what the correct fix should be.

--- drivers/s390/char/ctrlchar.c.orig   2003-09-14 19:16:45.000000000 -0400
+++ drivers/s390/char/ctrlchar.c        2003-09-14 19:58:04.000000000 -0400
@@ -9,6 +9,7 @@

 #include <linux/config.h>
 #include <linux/stddef.h>
+#include <linux/errno.h>
 #include <linux/sysrq.h>
 #include <linux/ctype.h>
 #include <linux/interrupt.h>


Any advice from Boeblingen?


Thanks,

Mark Post

Reply via email to