lkml.org 
[lkml]   [2001]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Unresolved symbol memset
More important activities lacking, "Michael Smith" <smithmg@agere.com> wrote:

> That particular header is included. As I mentioned, I am using memset
> in other areas of the code, as well as the same file. If I take this
> one call out of the source, it compiles, links and I am able to perform
> and insmod correctly. Below are the headers that are included in the
> file, and the area of the code that is causing the problem. Let me say
> that the code, even with this particular call in, compiles and links.
> The problem happens when I go to perform the insmod on it.
>
> #include <memory.h>
> #include <string.h>
> #include "myownheaders.h"
>
>
> void myfunction( void *a, int len )
> {
> ....
> Mymemmove() //used because NdisMoveMemory can not be used
> memset( &a->WORD[NUMWORDS-len], 0, len*4);
> ...
> }

Inside a driver (or module) file, any include reference that doesn't begin with
either <linux/foo.h> or <asm/foo.h> should always raise a red flag. There are
user-land header files ("/usr/include") and kernel header files
("/usr/src/linux/include") and never the twain shall meet.

Mixing includes is always a bad idea.

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + -- -- -- -- -- -- -- -- -- --
Tommy Reynolds | mailto: <reynolds@redhat.com>
Red Hat, Inc., Embedded Development Services | Phone: +1.256.704.9286
307 Wynn Drive NW, Huntsville, AL 35805 USA | FAX: +1.256.837.3839
Senior Software Developer | Mobile: +1.919.641.2923
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.182 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site