@@ -39,6 +39,8 @@
((iface)->dhcpv6_assignall || (i) == (m) || \
(addrs)[(i)].prefix > 64)
+extern struct config config;
+
static void dhcpv6_netevent_cb(unsigned long event, struct netevent_handler_info *info);
static void apply_lease(struct dhcp_assignment *a, bool add);
static void set_border_assignment_size(struct interface *iface, struct dhcp_assignment *b);
@@ -43,7 +43,7 @@
#include <libubox/uloop.h>
#include "odhcpd.h"
-
+extern struct config config;
static int ioctl_sock = -1;
static int urandom_fd = -1;
@@ -139,7 +139,7 @@ struct config {
char *dhcp_cb;
char *dhcp_statefile;
int log_level;
-} config;
+};
struct lease {
GCC10 mandates the C++ one definition rule, which breaks on multiple definitions of config. Add the appropriate extern declarations. Signed-off-by: Rosen Penev <rosenp@gmail.com> --- src/dhcpv6-ia.c | 2 ++ src/odhcpd.c | 2 +- src/odhcpd.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-)