From 059844e4399be41ed5be413a45f7597ce105b5b4 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 21 Jun 2020 21:37:36 -0700 Subject: [PATCH] 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 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 { -- 2.30.2