summaryrefslogtreecommitdiffstats
path: root/if-bsd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-05-08 23:38:15 +0000
committerRoy Marples <roy@marples.name>2014-05-08 23:38:15 +0000
commit85cdddc2c91aa2674bc137327cfa05678de4a2a4 (patch)
treef95d42abed2a180cac5f5332beb9710aff73aa5e /if-bsd.c
parent72c37f5f56ea5ca3c46bfc4c646be7ed1f1ef95c (diff)
downloaddhcpcd-85cdddc2c91aa2674bc137327cfa05678de4a2a4.tar.xz
Fix compile issue
Diffstat (limited to 'if-bsd.c')
-rw-r--r--if-bsd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/if-bsd.c b/if-bsd.c
index bff1252f..e6dcd528 100644
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -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 @@ if_managelink(struct dhcpcd_ctx *ctx)
#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;