Skip to contentSkip to conversation

fuse: Fix build after change to synchronize with library

PATCH In review Arve Hjønnevåg 2 participants 3 messages Mar 11, 2013 – Mar 12, 2013 FUSE filesystem core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fuse: Fix build after change to synchronize with library

__linux__ is not always defined so check __KERNEL__ as well.

---
 include/uapi/linux/fuse.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/fuse.h +1 -1
index 4c43b44..fc5d400 100644
@@ -95,7 +95,7 @@
 #ifndef _LINUX_FUSE_H
 #define _LINUX_FUSE_H
 
-#ifdef __linux__
+#if defined(__KERNEL__) || defined(__linux__)
 #include <linux/types.h>
 #else
 #include <stdint.h>
Signature · 1 line
1.8.1.3
#1 lore raw
Quoted 12 lines · Arve Hjønnevåg

__linux__ is not always defined so check __KERNEL__ as well.

---
 include/uapi/linux/fuse.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/fuse.h +0 -0
index 4c43b44..fc5d400 100644

include/uapi/linux/fuse.h line 98

Quoted 5 lines
include/uapi/linux/fuse.h +1 -1
@@ -95,7 +95,7 @@
 #ifndef _LINUX_FUSE_H
 #define _LINUX_FUSE_H
 
-#ifdef __linux__
+#if defined(__KERNEL__) || defined(__linux__)

Or how about just

#ifdef __KERNEL__

?

Thanks,
Miklos

#2 lore raw
Quoted 16 lines · Miklos Szeredi
Quoted 15 lines · Arve Hjønnevåg

__linux__ is not always defined so check __KERNEL__ as well.

---
 include/uapi/linux/fuse.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/fuse.h +0 -0
index 4c43b44..fc5d400 100644
@@ -95,7 +95,7 @@
 #ifndef _LINUX_FUSE_H
 #define _LINUX_FUSE_H
 
Quoted 7 lines

include/uapi/linux/fuse.h line 98

Quoted 2 lines
include/uapi/linux/fuse.h +1 -1
-#ifdef __linux__
+#if defined(__KERNEL__) || defined(__linux__)

Or how about just

#ifdef __KERNEL__

I don't think that will give you the same behavior when compiling user-space code.

Signature · 1 line
Arve Hjønnevåg