distrib/special/slaacd is the actual user of SMALL but being able to
build it from sbin/slaacd does not harm; in fact, this revealed two
unused (with SMALL) buffers.
OK?
Index: control.c
===================================================================
RCS file: /cvs/src/sbin/slaacd/control.c,v
retrieving revision 1.8
diff -u -p -r1.8 control.c
--- control.c 2 Mar 2021 04:10:07 -0000 1.8
+++ control.c 20 Mar 2021 16:21:33 -0000
@@ -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 */
Index: engine.c
===================================================================
RCS file: /cvs/src/sbin/slaacd/engine.c,v
retrieving revision 1.67
diff -u -p -r1.67 engine.c
--- engine.c 7 Mar 2021 10:31:57 -0000 1.67
+++ engine.c 20 Mar 2021 16:23:27 -0000
@@ -622,10 +622,10 @@ engine_dispatch_main(int fd, short event
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
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]);
Index: frontend.c
===================================================================
RCS file: /cvs/src/sbin/slaacd/frontend.c,v
retrieving revision 1.52
diff -u -p -r1.52 frontend.c
--- frontend.c 11 Mar 2021 19:53:40 -0000 1.52
+++ frontend.c 20 Mar 2021 16:24:50 -0000
@@ -954,7 +954,10 @@ icmp6_receive(int fd, short events, void
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) {
Index: log.c
===================================================================
RCS file: /cvs/src/sbin/slaacd/log.c,v
retrieving revision 1.1
diff -u -p -r1.1 log.c
--- log.c 3 Jun 2017 10:00:29 -0000 1.1
+++ log.c 20 Mar 2021 16:22:27 -0000
@@ -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 */