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

sbin/slaacd/engine.c
sbin/slaacd/frontend.c
sbin/slaacd/slaacd.c

index 2d75a4b..3e8d93c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: engine.c,v 1.58 2021/01/19 16:48:20 florian Exp $     */
+/*     $OpenBSD: engine.c,v 1.59 2021/01/19 16:49:56 florian Exp $     */
 
 /*
  * Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -329,8 +329,8 @@ int                  engine_imsg_compose_main(int, pid_t, void *, uint16_t);
 uint32_t                real_lifetime(struct timespec *, uint32_t);
 void                    merge_dad_couters(struct radv *, struct radv *);
 
-struct imsgev          *iev_frontend;
-struct imsgev          *iev_main;
+static struct imsgev   *iev_frontend;
+static struct imsgev   *iev_main;
 int64_t                         proposal_id;
 
 uint32_t                desync_factor;
index e04ee63..0ab1ab1 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: frontend.c,v 1.48 2021/01/19 16:49:10 florian Exp $   */
+/*     $OpenBSD: frontend.c,v 1.49 2021/01/19 16:49:56 florian Exp $   */
 
 /*
  * Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -101,8 +101,8 @@ const char  *flags_to_str(int);
 #endif /* SMALL */
 
 LIST_HEAD(, iface)              interfaces;
-struct imsgev                  *iev_main;
-struct imsgev                  *iev_engine;
+static struct imsgev           *iev_main;
+static struct imsgev           *iev_engine;
 struct event                    ev_route;
 struct msghdr                   sndmhdr;
 struct iovec                    sndiov[4];
index 00a9d20..9a11323 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: slaacd.c,v 1.55 2021/01/19 16:48:20 florian Exp $     */
+/*     $OpenBSD: slaacd.c,v 1.56 2021/01/19 16:49:56 florian Exp $     */
 
 /*
  * Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -84,13 +84,13 @@ static int  main_imsg_send_ipc_sockets(struct imsgbuf *, struct imsgbuf *);
 int            main_imsg_compose_frontend(int, int, void *, uint16_t);
 int            main_imsg_compose_engine(int, pid_t, void *, uint16_t);
 
-struct imsgev          *iev_frontend;
-struct imsgev          *iev_engine;
+static struct imsgev   *iev_frontend;
+static struct imsgev   *iev_engine;
 
-pid_t   frontend_pid;
-pid_t   engine_pid;
+pid_t                   frontend_pid;
+pid_t                   engine_pid;
 
-int     routesock, ioctl_sock, rtm_seq = 0;
+int                     routesock, ioctl_sock, rtm_seq = 0;
 
 void
 main_sig_handler(int sig, short event, void *arg)