From: Rosen Penev Date: Mon, 22 Jun 2020 04:37:36 +0000 (-0700) Subject: odhcpd: fix compilation with GCC10 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=refs%2Fheads%2Fopenwrt-19.07;p=oweals%2Fodhcpd.git 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 --- diff --git a/src/odhcpd.c b/src/odhcpd.c index 4b8e589..c82ee14 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 37a5a4a..d17fbfb 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; @@ -138,7 +139,7 @@ struct config { char *dhcp_cb; char *dhcp_statefile; int log_level; -} config; +}; struct lease {