summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-06-21 21:37:36 -0700
committerHans Dedecker <dedeckeh@gmail.com>2020-06-23 22:14:57 +0200
commit5da52992a3926b36e53d0a5d55955a6ccbc35872 (patch)
treef5357789ae7d5f1ec798a286b688ca8c3c803200 /src
parent5ce077026b991f49d96464587386f93d92f56385 (diff)
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 <rosenp@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/odhcpd.c2
-rw-r--r--src/odhcpd.h3
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 <libubox/uloop.h>
#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 {