Re: [PATCH][RESEND] do not redefine userspace's NULL #define

From: Arnd Bergmann
Date: Sat Apr 14 2012 - 04:29:30 EST


On Friday 13 April 2012, Lubos Lunak wrote:
> If that were the case, one of the earlier versions of the patch would have
> been correct then, but as Arnd has pointed out, user applications do include
> the header. It's even as simple as:
>
> #include <signal.h>
>
> ( -> bits/sigcontext.h -> asm/sigcontext.h -> linux/types.h ->
> linux/posix_types.h -> linux/stddef.h ).
>

I knew there must have been something wrong with my thinking and I
clearly missed the posix_types.h reference. I accidentally did
'git grep linux/stddef.h obj/usr/include', instead of 'grep -r'.

I've tried to be more thorough this time, and I think that nothing
stops us from removing the linux/stddef.h include from the exported
version of posix_types.h, but we should probably make sure that we
still include linux/compiler.h, because a lot of stuff that includes
linux/posix_types.h expects that. Alternatively, we can just move the
NULL definition inside of #ifdef __KERNEL__.

Arnd
--
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/