Quoting Michael Welles ([EMAIL PROTECTED]):
> 
> Apologies in advance if this is a stupid question -- I'm pretty sure
> I'm dealing with a very simple problem, but I can't figure out how to
> fix. 
> 
> I've written a kernel module which builds cleanly on a stock RH 7.0
> system, but when I try to build it on my 2.2 Debian box, I get a
> *host* of errors, all to do with header parsing (I'll keep the output
> brief here).  The Debian box has libc6-dev installed,
> kernel-headers-2.2.12-4, and kernel-source 2.2.12.  
> 
> On the RH box, I'm building against kernel 2.2.16 with gcc 2.96, and
> on the Debian box, 2.2.12 and gcc 2.95.2. 

> cd /home/mike/src/bangrep/changedfiles/
> make -k 
> gcc -Wall -DMODULE -D__KERNEL__ -DLINUX -c changedfiles.c
> In file included from /usr/include/linux/fs.h:262,
>                  from changedfiles.c:4:
> /usr/include/linux/hpfs_fs_i.h:5: parse error before `ino_t'

  ^^^^^^^^^^^^^^^^^^^

It looks as though you're compiling a module source against
non-kernel-headers. /usr/include/linux headers are for compiling
user/libc6 programs. You need -I/usr/local/src/linux/include
to get the appropriate kernel headers (though my example
assumes that that path points to the appropriate kernel version).

Bear in mind that Debian is one of the few distributions that
handles the /usr/include/{asm,linux} links correctly. You may
be depending on having them point, incorrectly, to the kernel
source. (See /usr/doc/kernel-source-.../README.headers.gz for
details.)

Cheers,

-- 
Email:  [EMAIL PROTECTED]   Tel: +44 1908 653 739  Fax: +44 1908 655 151
Snail:  David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer:   These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.

Reply via email to