summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2023-01-20 14:07:38 +0100
committerMaria Matejka <mq@ucw.cz>2023-01-20 18:31:57 +0100
commit343628d8c0f1848b968930f6dbabdd1174404b14 (patch)
treeab4e9fa467dc371529fc148c0fe1669864b47b74 /nest
parent1127f19a7a12b162064b1f521acd5c0017fbcf89 (diff)
Fixed various build problems on FreeBSD and/or CLang
Diffstat (limited to 'nest')
-rw-r--r--nest/rt-table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index e712796b..48f5587b 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -3352,8 +3352,8 @@ ea_set_hostentry(ea_list **to, rtable *dep, rtable *src, ip_addr gw, ip_addr ll,
struct {
struct adata ad;
struct hostentry *he;
- u32 labels[lnum];
- } *head = (void *) tmp_alloc_adata(sizeof *head - sizeof(struct adata));
+ u32 labels[0];
+ } *head = (void *) tmp_alloc_adata(sizeof *head + sizeof(u32) * lnum - sizeof(struct adata));
RT_LOCKED(src, tab)
head->he = rt_get_hostentry(tab, gw, ll, dep);