summaryrefslogtreecommitdiffstats
path: root/avahi-core
diff options
context:
space:
mode:
authorSebastien Estienne <sebastien.estienne@gmail.com>2005-10-25 01:20:30 +0000
committerSebastien Estienne <sebastien.estienne@gmail.com>2005-10-25 01:20:30 +0000
commit8d83c6ca359d27f7c90ba874add798d064e58bc2 (patch)
treecb679891612def57b0f2e5f1d921f11127648379 /avahi-core
parent3073103812f0ea376582eb0ff1479945a847b361 (diff)
* small hack for netbsd
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@864 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core')
-rw-r--r--avahi-core/iface-pfroute.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/avahi-core/iface-pfroute.c b/avahi-core/iface-pfroute.c
index 4822d59..a7ecdc9 100644
--- a/avahi-core/iface-pfroute.c
+++ b/avahi-core/iface-pfroute.c
@@ -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;