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

usr.sbin/rad/engine.c
usr.sbin/rad/frontend.c
usr.sbin/rad/rad.c

index ef8506c..9a93983 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: engine.c,v 1.17 2021/01/19 16:53:27 florian Exp $     */
+/*     $OpenBSD: engine.c,v 1.18 2021/01/19 16:54:48 florian Exp $     */
 
 /*
  * Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -64,9 +64,9 @@ void                   remove_iface(uint32_t);
 struct engine_iface    *find_engine_iface_by_id(uint32_t);
 void                    iface_timeout(int, short, void *);
 
-struct rad_conf        *engine_conf;
-struct imsgev          *iev_frontend;
-struct imsgev          *iev_main;
+struct rad_conf                *engine_conf;
+static struct imsgev   *iev_frontend;
+static struct imsgev   *iev_main;
 struct sockaddr_in6     all_nodes;
 
 void
index 87a9f18..e6f6ae0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: frontend.c,v 1.38 2021/01/19 16:54:00 florian Exp $   */
+/*     $OpenBSD: frontend.c,v 1.39 2021/01/19 16:54:48 florian Exp $   */
 
 /*
  * Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -151,8 +151,8 @@ void                         handle_route_message(struct rt_msghdr *,
                             struct sockaddr **);
 
 struct rad_conf        *frontend_conf;
-struct imsgev          *iev_main;
-struct imsgev          *iev_engine;
+static struct imsgev   *iev_main;
+static struct imsgev   *iev_engine;
 struct event            ev_route;
 int                     ioctlsock = -1, routesock = -1;
 struct ipv6_mreq        all_routers;
index 0b578c2..ad6d16a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: rad.c,v 1.25 2021/01/19 16:53:27 florian Exp $        */
+/*     $OpenBSD: rad.c,v 1.26 2021/01/19 16:54:48 florian Exp $        */
 
 /*
  * Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -77,15 +77,13 @@ int main_sendboth(enum imsg_type, void *, uint16_t);
 
 void   in6_prefixlen2mask(struct in6_addr *, int len);
 
-struct rad_conf        *main_conf;
-struct imsgev          *iev_frontend;
-struct imsgev          *iev_engine;
+struct rad_conf                *main_conf;
+static struct imsgev   *iev_frontend;
+static struct imsgev   *iev_engine;
 char                   *conffile;
-
-pid_t   frontend_pid;
-pid_t   engine_pid;
-
-uint32_t cmd_opts;
+pid_t                   frontend_pid;
+pid_t                   engine_pid;
+uint32_t                cmd_opts;
 
 void
 main_sig_handler(int sig, short event, void *arg)