Mercurial > hg > dhcpcd
changeset 4472:9fc687d07672 draft
Fix compile for non-sun
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Tue, 23 Apr 2019 18:34:27 +0100 |
| parents | 15b9659186e8 |
| children | f6e589475882 |
| files | src/ipv6nd.c |
| diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ipv6nd.c Tue Apr 23 17:27:52 2019 +0000 +++ b/src/ipv6nd.c Tue Apr 23 18:34:27 2019 +0100 @@ -265,11 +265,15 @@ 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 @@ logerr(__func__); return; } +#ifdef __sun state->nd_fd = -1; +#endif } #ifdef __sun
