public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] arch/um/include/init.h: Fix missing macro definitions
@ 2008-01-31 15:06 WANG Cong
  2008-02-01 17:29 ` Jeff Dike
  0 siblings, 1 reply; 2+ messages in thread
From: WANG Cong @ 2008-01-31 15:06 UTC (permalink / raw)
  To: LKML; +Cc: Jeff Dike, user-mode-linux-devel


This patch fixed the following build error in current -git tree.

arch/um/kernel/config.c:10: error: expected declaration specifiers or '...' before '.' token
...


Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

---

diff --git a/arch/um/include/init.h b/arch/um/include/init.h
index cebc6ca..70982e1 100644
--- a/arch/um/include/init.h
+++ b/arch/um/include/init.h
@@ -40,6 +40,18 @@
 typedef int (*initcall_t)(void);
 typedef void (*exitcall_t)(void);
 
+#ifndef __section
+# define __section(S) __attribute__ ((__section__(#S)))
+#endif
+
+#ifndef __used
+#if __GNUC__ == 3 && __GNUC_MINOR__ == 2
+# define __used                 __attribute__((__unused__))
+#else
+# define __used                 __attribute__((__used__))
+#endif
+#endif
+
 /* These are for everybody (although not all archs will actually
    discard it in modules) */
 #define __init		__section(.init.text)

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

end of thread, other threads:[~2008-02-01 17:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-31 15:06 [Patch] arch/um/include/init.h: Fix missing macro definitions WANG Cong
2008-02-01 17:29 ` Jeff Dike

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