Make imsg event structs static to fix -fno-common.
authorflorian <florian@openbsd.org>
Tue, 19 Jan 2021 16:52:40 +0000 (16:52 +0000)
committerflorian <florian@openbsd.org>
Tue, 19 Jan 2021 16:52:40 +0000 (16:52 +0000)
Follows claudio's lead in ospfd et al.
Problem reported by mortimer.

sbin/unwind/frontend.c
sbin/unwind/resolver.c
sbin/unwind/unwind.c

index 3129119..e563d95 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: frontend.c,v 1.63 2021/01/19 16:52:12 florian Exp $   */
+/*     $OpenBSD: frontend.c,v 1.64 2021/01/19 16:52:40 florian Exp $   */
 
 /*
  * Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -148,8 +148,8 @@ void                         free_bl(void);
 int                     pending_query_cnt(void);
 
 struct uw_conf         *frontend_conf;
-struct imsgev          *iev_main;
-struct imsgev          *iev_resolver;
+static struct imsgev   *iev_main;
+static struct imsgev   *iev_resolver;
 struct event            ev_route;
 int                     udp4sock = -1, udp6sock = -1;
 int                     tcp4sock = -1, tcp6sock = -1;
index c0af11d..f5a1f3e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: resolver.c,v 1.130 2021/01/19 16:50:23 florian Exp $  */
+/*     $OpenBSD: resolver.c,v 1.131 2021/01/19 16:52:40 florian Exp $  */
 
 /*
  * Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -197,8 +197,8 @@ int                 *resolvers_to_restart(struct uw_conf *,
 const char             *query_imsg2str(struct query_imsg *);
 
 struct uw_conf                 *resolver_conf;
-struct imsgev                  *iev_frontend;
-struct imsgev                  *iev_main;
+static struct imsgev           *iev_frontend;
+static struct imsgev           *iev_main;
 struct uw_forwarder_head        autoconf_forwarder_list;
 struct uw_resolver             *resolvers[UW_RES_NONE];
 int                             enabled_resolvers[UW_RES_NONE];
index dcb5be3..8cf1ab0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: unwind.c,v 1.55 2021/01/19 16:50:23 florian Exp $     */
+/*     $OpenBSD: unwind.c,v 1.56 2021/01/19 16:52:40 florian Exp $     */
 
 /*
  * Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -75,17 +75,14 @@ void                open_ports(void);
 void           solicit_dns_proposals(void);
 void           send_blocklist_fd(void);
 
-struct uw_conf *main_conf;
-struct imsgev  *iev_frontend;
-struct imsgev  *iev_resolver;
-char           *conffile;
-
-pid_t           frontend_pid;
-pid_t           resolver_pid;
-
-uint32_t        cmd_opts;
-
-int             routesock;
+struct uw_conf         *main_conf;
+static struct imsgev   *iev_frontend;
+static struct imsgev   *iev_resolver;
+char                   *conffile;
+pid_t                   frontend_pid;
+pid_t                   resolver_pid;
+uint32_t                cmd_opts;
+int                     routesock;
 
 void
 main_sig_handler(int sig, short event, void *arg)