packages/net/chrony/patches/003-gcc4.patch
florian 10a646eccb Fix chrony compilation with gcc4 and installation (#1482)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@6608 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-03-18 17:33:57 +00:00

21 lines
572 B
Diff

--- chrony-1.21/addrfilt.c.orig 2005-08-11 22:32:54.000000000 +0200
+++ chrony-1.21/addrfilt.c 2005-09-04 11:05:54.000000000 +0200
@@ -45,7 +45,7 @@
struct _TableNode;
-typedef struct _TableNode ExtendedTable[TABLE_SIZE];
+typedef struct _TableNode *ExtendedTable;
typedef enum {DENY, ALLOW, AS_PARENT} State;
@@ -124,7 +124,7 @@
if (node->extended == NULL) {
- node->extended = MallocNew(ExtendedTable);
+ node->extended = MallocArray(ExtendedTable, TABLE_SIZE);
for (i=0; i<TABLE_SIZE; i++) {
child_node = &((*(node->extended))[i]);