From 343628d8c0f1848b968930f6dbabdd1174404b14 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Fri, 20 Jan 2023 14:07:38 +0100 Subject: Fixed various build problems on FreeBSD and/or CLang --- nest/rt-table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nest') 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); -- cgit v1.2.3