aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2008-02-04 22:30:34 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 09:44:24 -0800
commit99c9f502cb3498b02b1e5df60c9ea0ee2e535373 (patch)
tree3f75e2cb7477b99f0568cd9f9aa40cd60af1dec7
parent747646a4d9d9ddfc7952f8c6d25ea1f323e689a0 (diff)
uml: arch/um/include/init.h needs a definition of __used
init.h started breaking now for some reason. It turns out that there wasn't a definition of __used. Fixed this by copying the relevant stuff from compiler.h in the userspace case, and including compiler.h in the kernel case. [xiyou.wangcong@gmail.com: added definition of __section] Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/um/include/init.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/arch/um/include/init.h b/arch/um/include/init.h
index cebc6cae919..b00a95741d4 100644
--- a/arch/um/include/init.h
+++ b/arch/um/include/init.h
@@ -40,6 +40,20 @@
typedef int (*initcall_t)(void);
typedef void (*exitcall_t)(void);
+#ifndef __KERNEL__
+#ifndef __section
+# define __section(S) __attribute__ ((__section__(#S)))
+#endif
+
+#if __GNUC_MINOR__ >= 3
+# define __used __attribute__((__used__))
+#else
+# define __used __attribute__((__unused__))
+#endif
+
+#else
+#include <linux/compiler.h>
+#endif
/* These are for everybody (although not all archs will actually
discard it in modules) */
#define __init __section(.init.text)
@@ -127,14 +141,3 @@ extern struct uml_param __uml_setup_start, __uml_setup_end;
#endif
#endif /* _LINUX_UML_INIT_H */
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only. This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */