]> git.meshlink.io Git - catta/commitdiff
* small hack for netbsd
authorSebastien Estienne <sebastien.estienne@gmail.com>
Tue, 25 Oct 2005 01:20:30 +0000 (01:20 +0000)
committerSebastien Estienne <sebastien.estienne@gmail.com>
Tue, 25 Oct 2005 01:20:30 +0000 (01:20 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@864 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/iface-pfroute.c

index 4822d5979e15d12ef6198182d91a8805d51d6d1e..a7ecdc95c57e010f12c7640a4153176b92724aa5 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <sys/param.h>
 #include <sys/sysctl.h>
 
 #include <net/route.h>
@@ -118,6 +119,11 @@ static void rtm_addr(struct rt_msghdr *rtm, AvahiInterfaceMonitor *m)
   int prefixlen = 0;
   struct sockaddr *sa  =NULL;
 
+#ifdef __NetBSD__  
+  if(((struct sockaddr *)cp)->sa_family == AF_UNSPEC)
+    ((struct sockaddr *)cp)->sa_family = AF_INET;
+#endif
+
   if(((struct sockaddr *)cp)->sa_family != AF_INET && ((struct sockaddr *)cp)->sa_family != AF_INET6)
     return;