From 5da52992a3926b36e53d0a5d55955a6ccbc35872 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 21 Jun 2020 21:37:36 -0700 Subject: odhcpd: fix compilation with GCC10 GCC10 mandates the C++ one definition rule, which breaks on multiple definitions of config. Add the appropriate extern declaration. Signed-off-by: Rosen Penev Signed-off-by: Hans Dedecker --- src/odhcpd.c | 2 -- src/odhcpd.h | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/odhcpd.c b/src/odhcpd.c index 26094b1..39e0e51 100644 --- a/src/odhcpd.c +++ b/src/odhcpd.c @@ -43,8 +43,6 @@ #include #include "odhcpd.h" - - static int ioctl_sock = -1; static int urandom_fd = -1; diff --git a/src/odhcpd.h b/src/odhcpd.h index 072a148..09013c4 100644 --- a/src/odhcpd.h +++ b/src/odhcpd.h @@ -44,6 +44,7 @@ struct interface; struct nl_sock; extern struct vlist_tree leases; +extern struct config config; struct odhcpd_event { struct uloop_fd uloop; @@ -139,7 +140,7 @@ struct config { char *dhcp_cb; char *dhcp_statefile; int log_level; -} config; +}; struct lease { -- cgit v1.2.3