]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile issue
authorRoy Marples <roy@marples.name>
Thu, 8 May 2014 23:38:15 +0000 (23:38 +0000)
committerRoy Marples <roy@marples.name>
Thu, 8 May 2014 23:38:15 +0000 (23:38 +0000)
if-bsd.c

index bff1252f4010ebf0b9bb5c9949a39a97092653fd..e6dcd528c822477333a863ebdfe461b94b699511 100644 (file)
--- 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;