Re: using memset in a module

Dan Aloni
2002-09-27T15:15:59Z

On Thu, Sep 26, 2002 at 07:02:26PM -0400, Shaya Potter wrote:
> On Thu, 2002-09-26 at 18:51, Randy.Dunlap wrote:
> > On 26 Sep 2002, Shaya Potter wrote:
> >
> > | I have a problem using memset in a module.
> > |
[snio]
> > What gcc options are you using?
> > You need -O2 at least.
> > ^ upper-case letter O
>
>
> yes, using it.
>
> gcc -Wall -DMODULE -DMODVERSIONS -D__KERNEL__ -DLINUX -DEXPORT_SYMTAB
> -I/usr/src/linux/include/ -I`pwd`/../migration
> -I`pwd`/..//virtualization -O2 -fomit-frame-pointer -pipe
> -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2
> -o fs1.o -c virtualizers/fs1.c

Try adding -nostdinc. Prehaps memset is picked up as 'extern' somehow.
If that doesn't work, compile with -E instead of -c and grep the
preprocessing output for memset, that may give a clue.

--
Dan Aloni
da-x@gmx.net