Mercurial > hg > dhcpcd
changeset 2482:46cb55263209 draft
Fix compile issue
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Thu, 08 May 2014 23:38:15 +0000 |
| parents | 06928b7119de |
| children | ef73d9711718 |
| files | if-bsd.c |
| diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/if-bsd.c Thu May 08 23:35:30 2014 +0000 +++ b/if-bsd.c Thu May 08 23:38:15 2014 +0000 @@ -74,6 +74,7 @@ #include "if-options.h" #include "ipv4.h" #include "ipv6.h" +#include "ipv6nd.h" #include "bpf-filter.h" @@ -762,8 +763,10 @@ #endif bytes = read(ctx->link_fd, msg, sizeof(msg)); - if (bytes == -1 || bytes == 0) - return bytes; + if (bytes == -1) + return -1; + if (bytes == 0) + return 0; e = msg + bytes; for (p = msg; p < e; p += rtm->rtm_msglen) { rtm = (struct rt_msghdr *)(void *)p;
