changeset 1863:0acca144defd draft

Fix compile on BSD
author Roy Marples <roy@marples.name>
date Tue, 19 Feb 2013 15:28:21 +0000
parents 53174e89d78a
children 49e324e42081
files if-bsd.c platform-bsd.c
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/if-bsd.c	Tue Feb 19 15:23:53 2013 +0000
+++ b/if-bsd.c	Tue Feb 19 15:28:21 2013 +0000
@@ -545,8 +545,8 @@
 					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]);
--- a/platform-bsd.c	Tue Feb 19 15:23:53 2013 +0000
+++ b/platform-bsd.c	Tue Feb 19 15:28:21 2013 +0000
@@ -35,6 +35,7 @@
 #include <stdlib.h>
 #include <syslog.h>
 
+#include "dhcpcd.h"
 #include "if-options.h"
 #include "platform.h"