make irtty.c compile again
PATCH 1/1 make irtty.c compile again
Hi,
irtty.c includes irqueue.h which includes linux/cache.h (via asm/processor.h <- asm/thread_info.h <- linux/thread_info.h <- linux/spinlock.h)
both irqueue.h and cache.h defines a ALIGN (for different purposes).
This patch renames ALIGN in irqueue.h to IRDA_ALIGN.
Guess i'll go grepping for more places ALIGN might be defined.
Signature · 40 lines
//anders/g
--- linux-2.5.6-pre3/include/net/irda/irda.h Thu Mar 7 19:13:01 2002
+++ linux-2.5.6-pre3-mekk/include/net/irda/irda.h Thu Mar 7 21:24:18 2002
@@ -54,8 +54,8 @@
#define IRDA_MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
-#ifndef ALIGN
-# define ALIGN __attribute__((aligned))
+#ifndef IRDA_ALIGN
+# define IRDA_ALIGN __attribute__((aligned))
#endif
#ifndef PACK
# define PACK __attribute__((packed))
diff -ru linux-2.5.6-pre3/include/net/irda/irqueue.h linux-2.5.6-pre3-mekk/include/net/irda/irqueue.h
--- linux-2.5.6-pre3/include/net/irda/irqueue.h Thu Mar 7 19:39:58 2002
+++ linux-2.5.6-pre3-mekk/include/net/irda/irqueue.h Thu Mar 7 21:24:18 2002
@@ -49,8 +49,8 @@
#define HASHBIN_SIZE 8
#define HASHBIN_MASK 0x7
-#ifndef ALIGN
-#define ALIGN __attribute__((aligned))
+#ifndef IRDA_ALIGN
+#define IRDA_ALIGN __attribute__((aligned))
#endif
#define Q_NULL { NULL, NULL, "", 0 }
@@ -75,8 +75,8 @@
__u32 magic;
int hb_type;
int hb_size;
- spinlock_t hb_mutex[HASHBIN_SIZE] ALIGN;
- irda_queue_t *hb_queue[HASHBIN_SIZE] ALIGN;
+ spinlock_t hb_mutex[HASHBIN_SIZE] IRDA_ALIGN;
+ irda_queue_t *hb_queue[HASHBIN_SIZE] IRDA_ALIGN;
irda_queue_t* hb_current;
} hashbin_t;Quoted 6 lines · Anders Gustafsson
Hi,
irtty.cincludesirqueue.hwhich includeslinux/cache.h(viaasm/processor.h<-asm/thread_info.h<-linux/thread_info.h<-linux/spinlock.h)
Quoted 10 lines
both
irqueue.handcache.hdefines a ALIGN (for different purposes).This patch renames ALIGN in
irqueue.htoIRDA_ALIGN.Guess i'll go grepping for more places ALIGN might be defined.
Signature · 1 line
//anders/g
Wow ! As soon as I make an update of IrDA, "they" manage to
break it. It didn't take long ;-)
Thanks for the hint. Your patch is obviously correct. Either
you send it directly to Linus, or I'll do it later with other updates.
Jean
Quoted 38 lines
include/net/irda/irda.h +2
-2@@ -54,8 +54,8 @@#define IRDA_MIN (a, b) (((a) < (b)) ? (a) : (b))#endif -#ifndef ALIGN -# define ALIGN __attribute__((aligned)) +#ifndef IRDA_ALIGN +# define IRDA_ALIGN __attribute__((aligned))#endif #ifndef PACK # define PACK __attribute__((packed))diff -ru
linux-2.5.6-pre3/include/net/irda/irqueue.hlinux-2.5.6-pre3-mekk/include/net/irda/irqueue.hinclude/net/irda/irqueue.h +4
-4@@ -49,8 +49,8 @@#define HASHBIN_SIZE 8#define HASHBIN_MASK 0x7 -#ifndef ALIGN -#define ALIGN __attribute__((aligned)) +#ifndef IRDA_ALIGN +#define IRDA_ALIGN __attribute__((aligned))#endif #define Q_NULL { NULL, NULL, "", 0 }@@ -75,8 +75,8 @@__u32 magic;int hb_type;int hb_size; - spinlock_t hb_mutex[HASHBIN_SIZE] ALIGN; - irda_queue_t *hb_queue[HASHBIN_SIZE] ALIGN; + spinlock_t hb_mutex[HASHBIN_SIZE] IRDA_ALIGN; + irda_queue_t *hb_queue[HASHBIN_SIZE] IRDA_ALIGN;irda_queue_t * hb_current; } hashbin_t;