linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fuse: use kernel headers when __KERNEL__ is set
@ 2013-04-15 20:41 Colin Cross
  2013-04-15 21:47 ` Colin Cross
  0 siblings, 1 reply; 12+ messages in thread
From: Colin Cross @ 2013-04-15 20:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: torvalds, Colin Cross, Miklos Szeredi, open list:FUSE: FILESYSTEM...

Commit 7e98d53086d18c877cb44e9065219335184024de (Synchronize fuse
header with one used in library) added #ifdef __linux__ around
defines if it is not set.  The kernel build is self-contained and
can be built on non-Linux toolchains.  After the mentioned commit
builds on non-Linux toolchains will try to include stdint.h and
fail due to -nostdinc, and then fail with a bunch of undefined
type errors.

Change the #ifdef to check for __linux__ or __KERNEL__ so that
it uses the kernel typedefs if __KERNEL__ is set.

Signed-off-by: Colin Cross <ccross@android.com>
---
I think this should go in v3.9, without it bare-metal toolchains
that don't define __linux__ will fail to compile the kernel, and
cross-compiles from non-linux hosts will probably also fail.

 include/uapi/linux/fuse.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index 4c43b44..5b79443 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux/fuse.h
@@ -95,7 +95,7 @@
 #ifndef _LINUX_FUSE_H
 #define _LINUX_FUSE_H
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__KERNEL__)
 #include <linux/types.h>
 #else
 #include <stdint.h>
-- 
1.8.1.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-04-17 20:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-15 20:41 [PATCH] fuse: use kernel headers when __KERNEL__ is set Colin Cross
2013-04-15 21:47 ` Colin Cross
2013-04-16 14:21   ` Miklos Szeredi
2013-04-16 15:59     ` Linus Torvalds
2013-04-16 17:24       ` Miklos Szeredi
2013-04-16 18:21         ` Linus Torvalds
2013-04-16 18:29           ` Colin Cross
2013-04-16 19:11             ` Miklos Szeredi
2013-04-16 20:00               ` Colin Cross
2013-04-17  9:57                 ` Miklos Szeredi
2013-04-17 19:45                   ` Colin Cross
2013-04-17 20:59                     ` Miklos Szeredi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).