# HG changeset patch # User Roy Marples # Date 1590775991 -10800 # Node ID 3bc21bfa52f8d22c1149a1aefde957db14b85bd2 # Parent b7d18124ad21fca12748eb5aece9a71a785981a8 Solaris: Fix compile But if_init is failing? Odd as this has not changed. diff -r b7d18124ad21 -r 3bc21bfa52f8 src/bpf.c --- a/src/bpf.c Thu May 28 09:02:13 2020 +0100 +++ b/src/bpf.c Fri May 29 21:13:11 2020 +0300 @@ -251,7 +251,7 @@ /* After 2^31 bytes, the kernel offset overflows. * To work around this bug, lseek 0. */ if (bytes == -1 && errno == EINVAL) { - lseek(fd, 0, SEEK_SET); + lseek(bpf->bpf_fd, 0, SEEK_SET); continue; } #endif diff -r b7d18124ad21 -r 3bc21bfa52f8 src/if-sun.c --- a/src/if-sun.c Thu May 28 09:02:13 2020 +0100 +++ b/src/if-sun.c Fri May 29 21:13:11 2020 +0300 @@ -1600,9 +1600,9 @@ #ifdef INET /* XXX We should fix this to write via the BPF interface. */ ssize_t -bpf_send(const struct interface *ifp, __unused int fd, uint16_t protocol, - const void *data, size_t len) +bpf_send(const struct bpf *bpf, uint16_t protocol, const void *data, size_t len) { + const struct interface *ifp = bpf->bpf_ifp; dlpi_handle_t dh; dlpi_info_t di; int r; diff -r b7d18124ad21 -r 3bc21bfa52f8 src/ipv6nd.c --- a/src/ipv6nd.c Thu May 28 09:02:13 2020 +0100 +++ b/src/ipv6nd.c Fri May 29 21:13:11 2020 +0300 @@ -253,7 +253,7 @@ if (state->nd_fd != -1) return state->nd_fd; - fd = ipv6nd_open0(true); + fd = ipv6nd_open(true); if (fd == -1) return -1; @@ -331,7 +331,9 @@ struct cmsghdr *cm; struct in6_pktinfo pi = { .ipi6_ifindex = ifp->index }; int s; +#ifndef __sun struct dhcpcd_ctx *ctx = ifp->ctx; +#endif if (ipv6_linklocal(ifp) == NULL) { logdebugx("%s: delaying Router Solicitation for LL address",