From b0a0f6d450c114c73fdb991d7937f44476602053 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 23 Apr 2019 18:34:27 +0100 Subject: [PATCH] Fix compile for non-sun --- src/ipv6nd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ipv6nd.c b/src/ipv6nd.c index 59742ad2..76e34e02 100644 --- a/src/ipv6nd.c +++ b/src/ipv6nd.c @@ -265,11 +265,15 @@ ipv6nd_open(struct interface *ifp) static int ipv6nd_open(struct dhcpcd_ctx *ctx) { - int on; + int s, on; if (ctx->nd_fd != -1) return ctx->nd_fd; + s = ipv6nd_open0(); + if (s == -1) + return -1; + on = 1; if (setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on)) == -1) @@ -1809,7 +1813,9 @@ ipv6nd_startrs1(void *arg) logerr(__func__); return; } +#ifdef __sun state->nd_fd = -1; +#endif } #ifdef __sun -- 2.47.2