Re: my patches won't compile under 2.4.7

Richard Gooch
2001-07-31T23:30:06Z

Alan Cox writes:
> >
> > As of 2.4.7 my patches to the kernel won't compile. It appears to be
> > something to do with devfs_fs_kernel.h being part of miscdevices.h. I
> > have sifted through the code but have not been able to determine
> > exactly why they won't work any more. Here is the error output from
> > my compile:

I don't see why you're pointing the finger devfs_fs_kernel.h. Other
miscdevice drivers compile fine.

> > gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i586 -c -o speakup.o speakup.c
> > In file included from /usr/src/linux/include/linux/locks.h:8,
> > from /usr/src/linux/include/linux/devfs_fs_kernel.h:6,
> > from /usr/src/linux/include/linux/miscdevice.h:4,
> > from speakup.c:63:
> > /usr/src/linux/include/linux/pagemap.h:35: `currcons' undeclared here (not in a function)
> > /usr/src/linux/include/linux/pagemap.h:35: parse error before `.'
> > make[4]: *** [speakup.o] Error 1

Looking at my copy of include/linux/pagemap.h I see no instance of
"currcons" on line 35 or elsewhere.

> > I'm not sure even where to start trying to describe what I've looked
> > at and what I don't understand. It appears that page_cache_alloc() is
> > now an inline function with an argument passed to it, where it used to
> > be a #define with no arguments. I see that struct misc_device now has
> > a new member devfs_handle but the other drivers I've looked at rtc.c

This is not new. struct misc_device has had a "devfs_handle" field for
a long time. Since 2.3.46, in fact. So when you say above "since
2.4.7", I suspect you mean "after virgin 2.2.x". It would have helped
if you had specified this.

My guess is that your patch has some bad #define somewhere. Again, it
would have helped if you had sent the patch as well.

Anyway, I don't think this problem is even remotely related to devfs.
I suggest you post more complete information to the linux-kernel
mailing list. Then maybe someone there can help you.

Regards,

Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca