[Patch] arch/um/include/init.h: Fix missing macro definitions

From: WANG Cong
Date: Thu Jan 31 2008 - 10:09:37 EST



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@xxxxxxxxxxx>
Signed-off-by: WANG Cong <xiyou.wangcong@xxxxxxxxx>

---

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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/