public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fuse: Fix build after change to synchronize with library
@ 2013-03-11 22:54 Arve Hjønnevåg
  2013-03-12  9:02 ` Miklos Szeredi
  0 siblings, 1 reply; 3+ messages in thread
From: Arve Hjønnevåg @ 2013-03-11 22:54 UTC (permalink / raw)
  To: linux-kernel, Miklos Szeredi; +Cc: Arve Hjønnevåg

__linux__ is not always defined so check __KERNEL__ as well.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
---
 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..fc5d400 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(__KERNEL__) || defined(__linux__)
 #include <linux/types.h>
 #else
 #include <stdint.h>
-- 
1.8.1.3


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

* Re: [PATCH] fuse: Fix build after change to synchronize with library
  2013-03-11 22:54 [PATCH] fuse: Fix build after change to synchronize with library Arve Hjønnevåg
@ 2013-03-12  9:02 ` Miklos Szeredi
  2013-03-12 23:37   ` Arve Hjønnevåg
  0 siblings, 1 reply; 3+ messages in thread
From: Miklos Szeredi @ 2013-03-12  9:02 UTC (permalink / raw)
  To: Arve Hjønnevåg; +Cc: linux-kernel

On Mon, 2013-03-11 at 15:54 -0700, Arve Hjønnevåg wrote:
> __linux__ is not always defined so check __KERNEL__ as well.
> 
> Signed-off-by: Arve Hjønnevåg <arve@android.com>
> ---
>  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..fc5d400 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(__KERNEL__) || defined(__linux__)

Or how about just

#ifdef __KERNEL__

?

Thanks,
Miklos


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

* Re: [PATCH] fuse: Fix build after change to synchronize with library
  2013-03-12  9:02 ` Miklos Szeredi
@ 2013-03-12 23:37   ` Arve Hjønnevåg
  0 siblings, 0 replies; 3+ messages in thread
From: Arve Hjønnevåg @ 2013-03-12 23:37 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: linux-kernel

On Tue, Mar 12, 2013 at 2:02 AM, Miklos Szeredi <mszeredi@suse.cz> wrote:
> On Mon, 2013-03-11 at 15:54 -0700, Arve Hjønnevåg wrote:
>> __linux__ is not always defined so check __KERNEL__ as well.
>>
>> Signed-off-by: Arve Hjønnevåg <arve@android.com>
>> ---
>>  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..fc5d400 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(__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.

-- 
Arve Hjønnevåg

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

end of thread, other threads:[~2013-03-12 23:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 22:54 [PATCH] fuse: Fix build after change to synchronize with library Arve Hjønnevåg
2013-03-12  9:02 ` Miklos Szeredi
2013-03-12 23:37   ` Arve Hjønnevåg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox