Mercurial > hg > dhcpcd
changeset 5276:3bc21bfa52f8 draft
Solaris: Fix compile
But if_init is failing? Odd as this has not changed.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Fri, 29 May 2020 21:13:11 +0300 |
| parents | b7d18124ad21 |
| children | e60767dab375 |
| files | src/bpf.c src/if-sun.c src/ipv6nd.c |
| diffstat | 3 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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;
--- 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",
