Fix chrony compilation with gcc4 and installation (#1482)
[openwrt/svn-archive/archive.git] / net / chrony / patches / 003-gcc4.patch
1 --- chrony-1.21/addrfilt.c.orig 2005-08-11 22:32:54.000000000 +0200
2 +++ chrony-1.21/addrfilt.c 2005-09-04 11:05:54.000000000 +0200
3 @@ -45,7 +45,7 @@
4
5 struct _TableNode;
6
7 -typedef struct _TableNode ExtendedTable[TABLE_SIZE];
8 +typedef struct _TableNode *ExtendedTable;
9
10 typedef enum {DENY, ALLOW, AS_PARENT} State;
11
12 @@ -124,7 +124,7 @@
13
14 if (node->extended == NULL) {
15
16 - node->extended = MallocNew(ExtendedTable);
17 + node->extended = MallocArray(ExtendedTable, TABLE_SIZE);
18
19 for (i=0; i<TABLE_SIZE; i++) {
20 child_node = &((*(node->extended))[i]);