
From: Michael Obster <kernel@obster.org>

Prevents user-space including spinlock.h which breaks the build.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/include/linux/mc146818rtc.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -puN include/linux/mc146818rtc.h~mc146818rtch-include-fix include/linux/mc146818rtc.h
--- 25/include/linux/mc146818rtc.h~mc146818rtch-include-fix	2004-11-21 15:54:22.553779216 -0800
+++ 25-akpm/include/linux/mc146818rtc.h	2004-11-21 15:54:22.556778760 -0800
@@ -13,10 +13,12 @@
 
 #include <asm/io.h>
 #include <linux/rtc.h>			/* get the user-level API */
-#include <linux/spinlock.h>		/* spinlock_t */
 #include <asm/mc146818rtc.h>		/* register access macros */
 
+#ifdef __KERNEL__
+#include <linux/spinlock.h>		/* spinlock_t */
 extern spinlock_t rtc_lock;		/* serialize CMOS RAM access */
+#endif
 
 /**********************************************************************
  * register summary
_
