lkml.org 
[lkml]   [2001]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: basic module bug
Evgeny Polyakov [johnpol@2ka.mipt.ru] wrote:
> Hello.
>
> On Sat, 25 Aug 2001 00:59:57 -0500
> Bob McElrath <mcelrath@draal.physics.wisc.edu> wrote:
>
> BM> both egcs 2.91.66 and redhat's gcc 2.96-85 barf on it:
>
> BM> In file included from /usr/src/linux/include/asm/semaphore.h:11,
> BM> from /usr/src/linux/include/linux/fs.h:198,
> <...>
> BM> used for global register variable
>
> BM> What have I done wrong?
>
> How do you compile this module?
> I've just trying to do this with the following command and all is OK:
> gcc ./test.c -c -o ./test.o -D__KERNEL__ -DMODULE.

That's because if you -D__KERNEL__ the whole file is ifdef'ed out. ;)

Remove the #ifdef __KERNEL__ stuff if you want to compile it that way.

> BM> Thanks,
> BM> -- Bob
>
> ---
> WBR. //s0mbre
-- Bob

Bob McElrath (rsmcelrath@students.wisc.edu)
Univ. of Wisconsin at Madison, Department of Physics
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 12:58    [W:0.076 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site