diff --git a/linux-atm-2.5.0-gcc4.patch b/linux-atm-2.5.0-gcc4.patch new file mode 100644 index 0000000..3da42b0 --- /dev/null +++ b/linux-atm-2.5.0-gcc4.patch @@ -0,0 +1,105 @@ +--- linux-atm/src/ilmid/atmf_uni.c~ 2005-01-18 14:35:53.000000000 +0000 ++++ linux-atm/src/ilmid/atmf_uni.c 2005-03-02 15:29:37.000000000 +0000 +@@ -228,7 +228,7 @@ AsnInt setNetPrefix(VarBind *varbind, Va + newPrefix->name = alloc_t(AsnOid); + newPrefix->name->octs = alloc(varBindName->octetLen); + AsnOidCopy(newPrefix->name, varBindName); +- Q_INSERT_BEFORE((NetPrefixNode *) var->value, newPrefix, prefix); ++ Q_INSERT_BEFORE((*((NetPrefixNode **)&var->value)), newPrefix, prefix); + if(atmNetPrefix.octs == NULL) + { + atmNetPrefix.octetLen = varBindName->octetLen - NETPREFIX_LEN - 2; +@@ -238,7 +238,7 @@ AsnInt setNetPrefix(VarBind *varbind, Va + } + else if (varbind->value->a.simple->a.number == INVALID && cmp == AsnOidEqual) + { +- Q_REMOVE((NetPrefixNode *) var->value, prefix); ++ Q_REMOVE((*((NetPrefixNode **) &var->value)), prefix); + } + + return NOERROR; +--- linux-atm/src/maint/atmtcp.c~ 2001-10-09 23:33:07.000000000 +0100 ++++ linux-atm/src/maint/atmtcp.c 2005-03-02 14:48:12.000000000 +0000 +@@ -60,7 +60,7 @@ static OUT *outputs = NULL; + static IN *inputs = NULL; + static fd_set in_set; + static int fds = 0; +-static int debug = 0; ++int debug = 0; + static int links = 0; + + +--- linux-atm/src/mpoad/p_factory.c~ 2001-10-09 23:33:07.000000000 +0100 ++++ linux-atm/src/mpoad/p_factory.c 2005-03-02 15:33:06.000000000 +0000 +@@ -31,16 +31,17 @@ unsigned short compute_ip_csum(unsigned + * beginning at location "addr". + */ + uint32_t sum = 0; ++ uint16_t *addr16 = addr; + + while( count > 1 ) { + /* This is the inner loop */ +- sum += * ((uint16_t *) addr)++; ++ sum += * addr16++; + count -= 2; + } + + /* Add left-over byte, if any */ + if( count > 0 ) +- sum += * (unsigned char *) addr; ++ sum += * (unsigned char *) addr16; + + /* Fold 32-bit sum to 16 bits */ + while (sum>>16) +--- linux-atm/src/qgen/qlib.c~ 2001-10-09 23:33:07.000000000 +0100 ++++ linux-atm/src/qgen/qlib.c 2005-03-02 14:42:45.000000000 +0000 +@@ -26,8 +26,6 @@ int q_dump = 0; + #include "op.h" + + +-static int debug = 0; +- + + void PREFIX(report)(int severity,const char *msg,...) + { +@@ -830,6 +828,8 @@ int PREFIX(close)(Q_DSC *dsc) + + #ifdef STANDALONE + ++int debug = 0; ++ + int main(int argc,const char **argv) + { + unsigned char msg[5000]; /* should be large enough for that */ +--- linux-atm/src/qgen/qlib.h~ 2001-10-09 23:33:07.000000000 +0100 ++++ linux-atm/src/qgen/qlib.h 2005-03-02 14:40:47.000000000 +0000 +@@ -23,7 +23,6 @@ + #define Q_FATAL -1 + + +-extern int q_dump; + extern void q_report(int severity,const char *msg,...); + + #ifdef DUMP_MODE +--- linux-atm/src/switch/debug/debug.c~ 2001-10-09 23:33:08.000000000 +0100 ++++ linux-atm/src/switch/debug/debug.c 2005-03-02 15:34:19.000000000 +0000 +@@ -18,7 +18,7 @@ + #define COMPONENT "FAB(debug)" + + +-#define PRV(call) ((FAB *) (call)->fab) ++#define PRV(call) (*((FAB **) &(call)->fab)) + + + typedef struct _fab { +--- linux-atm/src/switch/tcp/tcpsw.c~ 2001-10-09 23:33:08.000000000 +0100 ++++ linux-atm/src/switch/tcp/tcpsw.c 2005-03-02 15:34:55.000000000 +0000 +@@ -27,7 +27,7 @@ + + #define COMPONENT "FAB(tcp)" + +-#define PRV(call) ((FAB *) (call)->fab) ++#define PRV(call) (*((FAB **) &(call)->fab)) + + #define MAX_VCI 1024 + diff --git a/linux-atm.spec b/linux-atm.spec index 147747d..8d3fe9a 100644 --- a/linux-atm.spec +++ b/linux-atm.spec @@ -13,6 +13,7 @@ Source: linux-atm-2.5.0-20050118.tar.gz # Patch from Debian to sanify syslogging Patch0: linux-atm-2.5.0-br2684log.patch Patch1: linux-atm-2.5.0-stdlib.patch +Patch2: linux-atm-2.5.0-gcc4.patch %description Tools to support ATM networking under Linux. @@ -38,6 +39,7 @@ Linux ATM API. %setup -q -n linux-atm %patch0 -p0 %patch1 -p1 +%patch2 -p1 %build ./autotools