On Wed, May 21, 2003 at 09:14:41AM +0200, Tom Verbreyt wrote: > This morning however, I'm trying to compile a 2.4.20 kernel, and time and > again, I get these errors when make-ing a bzImage: > > In file included from ide-cd.c:318: > ide-cd.h:440: error: long, short, signed or unsigned used invalidly for > 'slot_tablelen' > > Has anyone experienced the same behaviour? What am I doing wrong? I don't > recall having done any different configuration than previous compilations > on other machines - I don't understand why this is happening. And since > I'm not a programmer at all, I'm quite, ehm, flabberghasted. > > So I was hoping someone could shed a light on this. The line it's moaning about reads '__u8 short slot_tablelen'... looks like it doesn't like the combination of 'short' with '__u8' : both are making explicit demands about the size of the variable, which conflict (short = 16 bits, __u8 = 8 bits). I am somewhat puzzled, though, because the same code compiles without error on my box... what gcc are you using? Mine's 2.95.4. Don't use 3.2. This also gives me no error: #include <stdio.h> #include <linux/types.h> int main(void){ __u8 short x; printf("Size of x is %d\n",sizeof(x)); } and prints "Size of x is 2". (With "short __u8 x", though, it gives me "Syntax error before 'x'"). So, the short overrides the __u8... I'd remove the __u8, then. Thousands of people's kernels must be running quite happily with a 16-bit value for slot_tablelen. This is the only such declaration in the entire kernel source; I guess it's a momentary brain fart that nobody but you has smelt yet... :-) -- Pigeon Be kind to pigeons Get my GPG key here: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x21C61F7F
Attachment:
pgpa7yr3y47Kw.pgp
Description: PGP signature