Re: [PATCH] fuse: use kernel headers when __KERNEL__ is set

From: Miklos Szeredi
Date: Tue Apr 16 2013 - 15:11:22 EST


On Tue, Apr 16, 2013 at 8:29 PM, Colin Cross <ccross@xxxxxxxxxxx> wrote:
> Dropping __linux__ causes a make headers_check warning, which the
> kbuild test robot reported this morning:
> usr/include/linux/fuse.h:99: found __[us]{8,16,32,64} type without
> #include <linux/types.h>
> Using my patch without modification does not cause that warning.
>
> linux/types.h defines the types that are used to communicate between
> the kernel and userspace. Redefining those in each header makes no
> sense, and will probably cause redefined types warnings if you compile
> a userspace file that includes fuse.h and another uapi header that
> properly includes linux/types.h.

<linux/types.h> is linux specific while the fuse API is cross
platform. So the userspace header obviously has to use some cross
platform type definitions. Making the type definitions depend on
__linux__ is probably just as unreliable in userspace as it is in the
kernel, so why complicate things with that?

Thanks,
Miklos
--
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/