summaryrefslogtreecommitdiffstats
path: root/avahi-core
diff options
context:
space:
mode:
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;