Re: Small problem, Can anybody help me?

From: Dave Jones
Date: Thu May 06 2004 - 09:35:03 EST


On Thu, May 06, 2004 at 07:31:56PM +0530, Srinivas G. wrote:

> I compiled it under same kernel version that is 2.4.18-3. It was showing
> the following errors.
>
> In file included from hello.c:2:
> /usr/include/linux/module.h:60: parse error before `atomic_t'
> /usr/include/linux/module.h:60: warning: no semicolon at end of struct
> or union
> /usr/include/linux/module.h:60: warning: no semicolon at end of struct
> or union
> /usr/include/linux/module.h:62: parse error before `}'
> /usr/include/linux/module.h:62: warning: data definition has no type or
> storage class
> /usr/include/linux/module.h:91: parse error before `}'

You're trying to include userspace headers into a kernel module.
This won't fly.

> The errors came due to a mistake in linux header file. Is it so...
>
> Thanks in advance for any help you can come up with.

Last week you claimed "Linux has broken spinlocks", this week "broken includes".
I suggest a trip to http://www.kernelnewbies.org/ may be in order
before you tackle anything more complicated than a helloworld module.

Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/