diff options
author | Jeff Dike <jdike@addtoit.com> | 2008-02-05 01:30:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:24 -0500 |
commit | 99c9f502cb3498b02b1e5df60c9ea0ee2e535373 (patch) | |
tree | 3f75e2cb7477b99f0568cd9f9aa40cd60af1dec7 /arch/um/include/init.h | |
parent | 747646a4d9d9ddfc7952f8c6d25ea1f323e689a0 (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>
Diffstat (limited to 'arch/um/include/init.h')
-rw-r--r-- | arch/um/include/init.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/arch/um/include/init.h b/arch/um/include/init.h index cebc6cae9190..b00a95741d41 100644 --- a/arch/um/include/init.h +++ b/arch/um/include/init.h | |||
@@ -40,6 +40,20 @@ | |||
40 | typedef int (*initcall_t)(void); | 40 | typedef int (*initcall_t)(void); |
41 | typedef void (*exitcall_t)(void); | 41 | typedef void (*exitcall_t)(void); |
42 | 42 | ||
43 | #ifndef __KERNEL__ | ||
44 | #ifndef __section | ||
45 | # define __section(S) __attribute__ ((__section__(#S))) | ||
46 | #endif | ||
47 | |||
48 | #if __GNUC_MINOR__ >= 3 | ||
49 | # define __used __attribute__((__used__)) | ||
50 | #else | ||
51 | # define __used __attribute__((__unused__)) | ||
52 | #endif | ||
53 | |||
54 | #else | ||
55 | #include <linux/compiler.h> | ||
56 | #endif | ||
43 | /* These are for everybody (although not all archs will actually | 57 | /* These are for everybody (although not all archs will actually |
44 | discard it in modules) */ | 58 | discard it in modules) */ |
45 | #define __init __section(.init.text) | 59 | #define __init __section(.init.text) |
@@ -127,14 +141,3 @@ extern struct uml_param __uml_setup_start, __uml_setup_end; | |||
127 | #endif | 141 | #endif |
128 | 142 | ||
129 | #endif /* _LINUX_UML_INIT_H */ | 143 | #endif /* _LINUX_UML_INIT_H */ |
130 | |||
131 | /* | ||
132 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
133 | * Emacs will notice this stuff at the end of the file and automatically | ||
134 | * adjust the settings for this buffer only. This must remain at the end | ||
135 | * of the file. | ||
136 | * --------------------------------------------------------------------------- | ||
137 | * Local variables: | ||
138 | * c-file-style: "linux" | ||
139 | * End: | ||
140 | */ | ||