summaryrefslogtreecommitdiffstats
path: root/avahi-core
diff options
context:
space:
mode:
authorSebastien Estienne <sebastien.estienne@gmail.com>2005-10-28 22:30:56 +0000
committerSebastien Estienne <sebastien.estienne@gmail.com>2005-10-28 22:30:56 +0000
commiteee711106f721fc73a1ef50348984b7a1d9cb595 (patch)
treeb4f05351d046fec9bf454c381b5fdb4018cf9e4f /avahi-core
parent48f053dc87279e2e3cad561db5b744cbcbf32387 (diff)
* many trivial fix to make avahi compile on OpenBSD
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@903 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core')
-rw-r--r--avahi-core/addr-util.c2
-rw-r--r--avahi-core/avahi-reflector.c4
-rw-r--r--avahi-core/avahi-test.c8
-rw-r--r--avahi-core/conformance-test.c8
-rw-r--r--avahi-core/dns-test.c1
-rw-r--r--avahi-core/dns.c4
-rw-r--r--avahi-core/entry.c9
-rw-r--r--avahi-core/iface-pfroute.c2
-rw-r--r--avahi-core/iface.c4
-rw-r--r--avahi-core/iface.h12
-rw-r--r--avahi-core/socket.c9
11 files changed, 44 insertions, 19 deletions
diff --git a/avahi-core/addr-util.c b/avahi-core/addr-util.c
index 7b9bb03..9e2d1e9 100644
--- a/avahi-core/addr-util.c
+++ b/avahi-core/addr-util.c
@@ -23,8 +23,8 @@
#include <config.h>
#endif
-#include <netinet/in.h>
#include <sys/types.h>
+#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <string.h>
diff --git a/avahi-core/avahi-reflector.c b/avahi-core/avahi-reflector.c
index a383965..df5539f 100644
--- a/avahi-core/avahi-reflector.c
+++ b/avahi-core/avahi-reflector.c
@@ -23,10 +23,12 @@
#include <config.h>
#endif
+#include <stdlib.h>
+
+#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <stdlib.h>
#include <avahi-common/simple-watch.h>
#include <avahi-core/core.h>
diff --git a/avahi-core/avahi-test.c b/avahi-core/avahi-test.c
index 9123bfe..f540cf4 100644
--- a/avahi-core/avahi-test.c
+++ b/avahi-core/avahi-test.c
@@ -23,13 +23,15 @@
#include <config.h>
#endif
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
#include <avahi-common/malloc.h>
#include <avahi-common/simple-watch.h>
#include <avahi-common/alternative.h>
diff --git a/avahi-core/conformance-test.c b/avahi-core/conformance-test.c
index 6873b5c..3c4ce6e 100644
--- a/avahi-core/conformance-test.c
+++ b/avahi-core/conformance-test.c
@@ -23,14 +23,16 @@
#include <config.h>
#endif
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <assert.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
#include <avahi-common/alternative.h>
#include <avahi-common/malloc.h>
#include <avahi-common/simple-watch.h>
diff --git a/avahi-core/dns-test.c b/avahi-core/dns-test.c
index 8a7586c..ae2343d 100644
--- a/avahi-core/dns-test.c
+++ b/avahi-core/dns-test.c
@@ -24,6 +24,7 @@
#endif
#include <assert.h>
+#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
diff --git a/avahi-core/dns.c b/avahi-core/dns.c
index b91ccd0..66b0bdf 100644
--- a/avahi-core/dns.c
+++ b/avahi-core/dns.c
@@ -23,13 +23,13 @@
#include <config.h>
#endif
-#include <netinet/in.h>
-
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
+#include <netinet/in.h>
+
#include <avahi-common/defs.h>
#include <avahi-common/domain.h>
#include <avahi-common/malloc.h>
diff --git a/avahi-core/entry.c b/avahi-core/entry.c
index 3621fe3..855e228 100644
--- a/avahi-core/entry.c
+++ b/avahi-core/entry.c
@@ -23,16 +23,19 @@
#include <config.h>
#endif
-#include <sys/socket.h>
-#include <arpa/inet.h>
#include <string.h>
-#include <sys/utsname.h>
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
+#include <arpa/inet.h>
+
+#include <sys/utsname.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
#include <avahi-common/domain.h>
#include <avahi-common/timeval.h>
#include <avahi-common/malloc.h>
diff --git a/avahi-core/iface-pfroute.c b/avahi-core/iface-pfroute.c
index a7ecdc9..c573075 100644
--- a/avahi-core/iface-pfroute.c
+++ b/avahi-core/iface-pfroute.c
@@ -119,7 +119,7 @@ static void rtm_addr(struct rt_msghdr *rtm, AvahiInterfaceMonitor *m)
int prefixlen = 0;
struct sockaddr *sa =NULL;
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__OpenBSD__)
if(((struct sockaddr *)cp)->sa_family == AF_UNSPEC)
((struct sockaddr *)cp)->sa_family = AF_INET;
#endif
diff --git a/avahi-core/iface.c b/avahi-core/iface.c
index 7afd251..6a92b8e 100644
--- a/avahi-core/iface.c
+++ b/avahi-core/iface.c
@@ -24,11 +24,13 @@
#endif
#include <string.h>
-#include <sys/socket.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
#include <avahi-common/error.h>
#include <avahi-common/malloc.h>
#include <avahi-common/domain.h>
diff --git a/avahi-core/iface.h b/avahi-core/iface.h
index 1671753..24da316 100644
--- a/avahi-core/iface.h
+++ b/avahi-core/iface.h
@@ -45,7 +45,17 @@ typedef struct AvahiHwInterface AvahiHwInterface;
#elif defined(HAVE_PF_ROUTE)
#include "iface-pfroute.h"
#else
-#error "No network configuration notification system available"
+typedef struct AvahiInterfaceMonitorOSDep AvahiInterfaceMonitorOSDep;
+struct AvahiInterfaceMonitorOSDep {
+
+ unsigned query_addr_seq, query_link_seq;
+
+ enum {
+ LIST_IFACE,
+ LIST_ADDR,
+ LIST_DONE
+ } list;
+};
#endif
#define AVAHI_MAC_ADDRESS_MAX 32
diff --git a/avahi-core/socket.c b/avahi-core/socket.c
index 0487023..a73bee8 100644
--- a/avahi-core/socket.c
+++ b/avahi-core/socket.c
@@ -27,9 +27,6 @@
#include <errno.h>
#include <string.h>
#include <stdio.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
@@ -37,6 +34,12 @@
#include <sys/ioctl.h>
#include <assert.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sys/uio.h>
+
#ifdef IP_RECVIF
#include <net/if_dl.h>
#endif