Re: tipc_config.h requires linux/string.h, which does not exist inexported headers

From: David Miller
Date: Wed Oct 31 2007 - 00:56:28 EST


From: David Miller <davem@xxxxxxxxxxxxx>
Date: Tue, 30 Oct 2007 21:14:04 -0700 (PDT)

> Unfortunately I have to back it out, it breaks the build.
>
> In file included from net/tipc/core.h:41,
> from net/tipc/addr.c:37:
> include/linux/tipc_config.h: In function 'TLV_SET':
> include/linux/tipc_config.h:306: error: implicit declaration of function 'memcpy'
> include/linux/tipc_config.h:306: warning: incompatible implicit declaration of built-in function 'memcpy'
>
> I truly think adding linux/string.h to unifdef-y along with:
>
> #ifndef __KERNEL__
> #include <string.h>
> #else
> ...
> #endif
>
> in linux/string.h is a much cleaner and less error prone solution :-)

Here is what I mean, specifically. And this is build tested :-)