From da8335c52a22d2f277fcb211083baa5e278ee76e Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 13 Aug 2006 12:47:53 +0200 Subject: [GCC4] fix build error in drivers/net/irda/donauboe.c This patch fixes this error with gcc 4 : donauboe.c:212: error: static declaration of 'irda_crc16_table' follows non-static declaration /usr/src/git/linux-2.4/include/net/irda/crc.h:22: error: previous declaration of 'irda_crc16_table' was here --- drivers/net/irda/donauboe.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index 5b78bb1..7d1bc00 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c @@ -209,7 +209,11 @@ static int do_probe = DO_PROBE; #ifdef CRC_EXPORTED extern __u16 const irda_crc16_table[]; #else -static __u16 const irda_crc16_table[256] = { +/* Our local version of irda_crc16_table must have a unique + name to prevent extern-redefined-as-static compile errors. + This #define redirects the irda_fcs() macro to our version. */ +#define irda_crc16_table donauboe_irda_crc16_table +static __u16 const donauboe_irda_crc16_table[256] = { 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, -- 1.4.2