patch-2.1.132 linux/include/asm-arm/spinlock.h

Next file: linux/include/asm-arm/system.h
Previous file: linux/include/asm-arm/socket.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.131/linux/include/asm-arm/spinlock.h linux/include/asm-arm/spinlock.h
@@ -37,8 +37,13 @@
  * irq-safe write-lock, but readers can get non-irqsafe
  * read-locks.
  */
-typedef struct { } rwlock_t;
-#define RW_LOCK_UNLOCKED { }
+#if (__GNUC__ > 2) || (__GNUC_MINOR__ >= 8)
+  typedef struct { } rwlock_t;
+# define RW_LOCK_UNLOCKED { }
+#else
+  typedef unsigned char rwlock_t;
+# define RW_LOCK_UNLOCKED 0
+#endif
 
 #define read_lock(lock)		do { } while(0)
 #define read_unlock(lock)	do { } while(0)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov