From e56e9441b589bca5244719cacb862d6c2f769507 Mon Sep 17 00:00:00 2001 From: kn Date: Sat, 20 Mar 2021 16:46:03 +0000 Subject: [PATCH] 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 --- sbin/slaacd/control.c | 4 +++- sbin/slaacd/engine.c | 6 ++++-- sbin/slaacd/frontend.c | 7 +++++-- sbin/slaacd/log.c | 5 +++-- 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 @@ -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 #include #include @@ -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 @@ -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 @@ -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 @@ -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 #include #include @@ -197,3 +197,4 @@ fatalx(const char *emsg, ...) va_end(ap); exit(1); } +#endif /* SMALL */ -- 2.20.1