lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1366058481-21033-1-git-send-email-ccross@android.com>
Date:	Mon, 15 Apr 2013 13:41:21 -0700
From:	Colin Cross <ccross@...roid.com>
To:	linux-kernel@...r.kernel.org
Cc:	torvalds@...ux-foundation.org, Colin Cross <ccross@...roid.com>,
	Miklos Szeredi <miklos@...redi.hu>,
	fuse-devel@...ts.sourceforge.net (open list:FUSE: FILESYSTEM...)
Subject: [PATCH] fuse: use kernel headers when __KERNEL__ is set

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@...roid.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ