summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorkn <kn@openbsd.org>2021-03-20 16:46:03 +0000
committerkn <kn@openbsd.org>2021-03-20 16:46:03 +0000
commite56e9441b589bca5244719cacb862d6c2f769507 (patch)
tree37b8105a3947809131c66706e75eff05d836eb92 /sbin
parentSKIP_PROPOSAL has been ripped out in 2019 (diff)
downloadwireguard-openbsd-e56e9441b589bca5244719cacb862d6c2f769507.tar.xz
wireguard-openbsd-e56e9441b589bca5244719cacb862d6c2f769507.zip
Fix SMALL build when done from sbin/slaacd
distrib/special/slaccd is the actual SMALL user but having it build from here is useful, too; in fact, it showed some more unused variables under SMALL. OK florian
Diffstat (limited to 'sbin')
-rw-r--r--sbin/slaacd/control.c4
-rw-r--r--sbin/slaacd/engine.c6
-rw-r--r--sbin/slaacd/frontend.c7
-rw-r--r--sbin/slaacd/log.c5
4 files changed, 15 insertions, 7 deletions
diff --git a/sbin/slaacd/control.c b/sbin/slaacd/control.c
index 16fb7b21401..bd3f2290f95 100644
--- a/sbin/slaacd/control.c
+++ b/sbin/slaacd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.8 2021/03/02 04:10:07 jsg Exp $ */
+/* $OpenBSD: control.c,v 1.9 2021/03/20 16:46:03 kn Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -15,6 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifndef SMALL
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/stat.h>
@@ -302,3 +303,4 @@ control_imsg_relay(struct imsg *imsg)
return (imsg_compose_event(&c->iev, imsg->hdr.type, 0, imsg->hdr.pid,
-1, imsg->data, IMSG_DATA_SIZE(*imsg)));
}
+#endif /* SMALL */
diff --git a/sbin/slaacd/engine.c b/sbin/slaacd/engine.c
index ed5ee83731a..34e16eff9fd 100644
--- a/sbin/slaacd/engine.c
+++ b/sbin/slaacd/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.67 2021/03/07 10:31:57 florian Exp $ */
+/* $OpenBSD: engine.c,v 1.68 2021/03/20 16:46:03 kn Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -622,10 +622,10 @@ engine_dispatch_main(int fd, short event, void *bula)
struct imsgev *iev = bula;
struct imsgbuf *ibuf = &iev->ibuf;
struct imsg_ifinfo imsg_ifinfo;
- struct slaacd_iface *iface;
ssize_t n;
int shut = 0;
#ifndef SMALL
+ struct slaacd_iface *iface;
struct imsg_addrinfo imsg_addrinfo;
struct address_proposal *addr_proposal = NULL;
size_t i;
@@ -2531,7 +2531,9 @@ iface_timeout(int fd, short events, void *arg)
struct timeval tv;
struct address_proposal *addr_proposal;
struct dfr_proposal *dfr_proposal;
+#ifndef SMALL
struct rdns_proposal *rdns_proposal;
+#endif /* SMALL */
log_debug("%s[%d]: %s", __func__, iface->if_index,
if_state_name[iface->state]);
diff --git a/sbin/slaacd/frontend.c b/sbin/slaacd/frontend.c
index 1a0c596914d..47dc80b83a3 100644
--- a/sbin/slaacd/frontend.c
+++ b/sbin/slaacd/frontend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frontend.c,v 1.52 2021/03/11 19:53:40 florian Exp $ */
+/* $OpenBSD: frontend.c,v 1.53 2021/03/20 16:46:03 kn Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -954,7 +954,10 @@ icmp6_receive(int fd, short events, void *arg)
struct cmsghdr *cm;
ssize_t len;
int if_index = 0, *hlimp = NULL;
- char ntopbuf[INET6_ADDRSTRLEN], ifnamebuf[IFNAMSIZ];
+ char ntopbuf[INET6_ADDRSTRLEN];
+#ifndef SMALL
+ char ifnamebuf[IFNAMSIZ];
+#endif /* SMALL */
icmp6ev = arg;
if ((len = recvmsg(fd, &icmp6ev->rcvmhdr, 0)) == -1) {
diff --git a/sbin/slaacd/log.c b/sbin/slaacd/log.c
index fa7718246e5..3c75d41192e 100644
--- a/sbin/slaacd/log.c
+++ b/sbin/slaacd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.1 2017/06/03 10:00:29 florian Exp $ */
+/* $OpenBSD: log.c,v 1.2 2021/03/20 16:46:03 kn Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-
+#ifndef SMALL
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
@@ -197,3 +197,4 @@ fatalx(const char *emsg, ...)
va_end(ap);
exit(1);
}
+#endif /* SMALL */