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;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 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 {