]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile on BSD
authorRoy Marples <roy@marples.name>
Tue, 19 Feb 2013 15:28:21 +0000 (15:28 +0000)
committerRoy Marples <roy@marples.name>
Tue, 19 Feb 2013 15:28:21 +0000 (15:28 +0000)
if-bsd.c
platform-bsd.c

index a8e68c6cfb41cbc26482a4097196bd24153521bf..45b3a48bb275a444f02c27c83cd5e63f1c4b0df1 100644 (file)
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -545,8 +545,8 @@ manage_link(int fd)
                                        break;
 #ifdef INET
                                get_addrs(rtm->rtm_addrs, cp, rti_info);
+                               memset(&rt, 0, sizeof(rt));
                                rt.iface = NULL;
-                               rt.next = NULL;
                                COPYOUT(rt.dest, rti_info[RTAX_DST]);
                                COPYOUT(rt.net, rti_info[RTAX_NETMASK]);
                                COPYOUT(rt.gate, rti_info[RTAX_GATEWAY]);
index f63235773d6ae803162c28368a1622b8e2f52179..192e888b06ef5ebccb101ef0a0581b750a363672 100644 (file)
@@ -35,6 +35,7 @@
 #include <stdlib.h>
 #include <syslog.h>
 
+#include "dhcpcd.h"
 #include "if-options.h"
 #include "platform.h"