Author: jue Date: 2006-02-24 09:01:50 +0100 (Fri, 24 Feb 2006) New Revision: 815 Added: crux-2.2/ports/opt/chrony/chrony-gcc4.patch Modified: crux-2.2/ports/opt/chrony/.md5sum crux-2.2/ports/opt/chrony/Pkgfile Log: chrony: added patch for gcc4 Modified: crux-2.2/ports/opt/chrony/.md5sum =================================================================== --- crux-2.2/ports/opt/chrony/.md5sum 2006-02-24 08:00:22 UTC (rev 814) +++ crux-2.2/ports/opt/chrony/.md5sum 2006-02-24 08:01:50 UTC (rev 815) @@ -1,4 +1,5 @@ 84f76a73dff5a3c9e9f11f3c29a4e93b chrony-1.21.tar.gz +7c14e438020092ba2cd10d2014749088 chrony-gcc4.patch 8450f776b8763a17a4e59b0f93aa79f8 chrony.conf ec43dcf700698a7d2891a1f8504b5e22 chrony.keys ef4b4ca7c250397656d81a329faf60d2 chronyd Modified: crux-2.2/ports/opt/chrony/Pkgfile =================================================================== --- crux-2.2/ports/opt/chrony/Pkgfile 2006-02-24 08:00:22 UTC (rev 814) +++ crux-2.2/ports/opt/chrony/Pkgfile 2006-02-24 08:01:50 UTC (rev 815) @@ -1,16 +1,17 @@ -# Description: Network time protocol client/server for dial-up client use +# Description: Network time protocol client/server # URL: http://chrony.sunsite.dk/index.php # Maintainer: J�rgen Daubert, juergen dot daubert at t-online dot de # Depends on: ncurses, readline name=chrony version=1.21 -release=1 +release=2 source=(http://chrony.sunsite.dk/download/$name-$version.tar.gz \ - chronyd chrony.conf chrony.keys) + $name-gcc4.patch chronyd chrony.conf chrony.keys) build () { cd $name-$version + patch -p1 < $SRC/$name-gcc4.patch ./configure --prefix=/usr make make DESTDIR=$PKG install Added: crux-2.2/ports/opt/chrony/chrony-gcc4.patch =================================================================== --- crux-2.2/ports/opt/chrony/chrony-gcc4.patch 2006-02-24 08:00:22 UTC (rev 814) +++ crux-2.2/ports/opt/chrony/chrony-gcc4.patch 2006-02-24 08:01:50 UTC (rev 815) @@ -0,0 +1,82 @@ +diff -Nru chrony-1.21.orig/addrfilt.c chrony-1.21/addrfilt.c +--- chrony-1.21.orig/addrfilt.c 2006-02-20 15:54:23.000000000 +0100 ++++ chrony-1.21/addrfilt.c 2006-02-20 16:03:59.000000000 +0100 +@@ -43,17 +43,15 @@ + /* Define the table size */ + #define TABLE_SIZE (1UL<<NBITS) + +-struct _TableNode; +- +-typedef struct _TableNode ExtendedTable[TABLE_SIZE]; +- + typedef enum {DENY, ALLOW, AS_PARENT} State; + + typedef struct _TableNode { + State state; +- ExtendedTable *extended; ++ struct _TableNode *extended; + } TableNode; + ++typedef struct _TableNode ExtendedTable[TABLE_SIZE]; ++ + struct ADF_AuthTableInst { + TableNode base; + }; +@@ -101,7 +99,7 @@ + + if (node->extended != NULL) { + for (i=0; i<TABLE_SIZE; i++) { +- child_node = &((*(node->extended))[i]); ++ child_node = node->extended + i; + close_node(child_node); + } + Free(node->extended); +@@ -124,10 +122,10 @@ + + if (node->extended == NULL) { + +- node->extended = MallocNew(ExtendedTable); ++ node->extended = (TableNode *) MallocArray(ExtendedTable, TABLE_SIZE); + + for (i=0; i<TABLE_SIZE; i++) { +- child_node = &((*(node->extended))[i]); ++ child_node = node->extended + i; + child_node->state = AS_PARENT; + child_node->extended = NULL; + } +@@ -168,7 +166,7 @@ + if (!(node->extended)) { + open_node(node); + } +- node = &((*(node->extended))[subnet]); ++ node = node->extended + subnet; + bits_to_go -= NBITS; + } + +@@ -187,7 +185,7 @@ + if (!(node->extended)) { + open_node(node); + } +- node = &((*(node->extended))[subnet]); ++ node = node->extended + subnet; + bits_to_go -= NBITS; + } + +@@ -199,7 +197,7 @@ + } + + for (i=subnet, j=0; j<N; i++, j++) { +- this_node = &((*(node->extended))[i]); ++ this_node = node->extended + i; + if (delete_children) { + close_node(this_node); + } +@@ -283,7 +281,7 @@ + if (node->extended) { + subnet = get_subnet(residual); + residual = get_residual(residual); +- node = &((*(node->extended))[subnet]); ++ node = node->extended + subnet; + } else { + /* Make decision on this node */ + finished = 1;