Portability fixes for FreeBSD - include the right headers.
authorEmil Mikulic <emikulic@gmail.com>
Sun, 15 May 2011 12:12:08 +0000 (22:12 +1000)
committerEmil Mikulic <emikulic@gmail.com>
Sun, 29 May 2011 05:56:18 +0000 (15:56 +1000)
addr.c
addr.h
hosts_db.h

diff --git a/addr.c b/addr.c
index dc23e32..721d5e3 100644 (file)
--- a/addr.c
+++ b/addr.c
@@ -9,6 +9,7 @@
 
 #include "addr.h"
 
+#include <arpa/inet.h> /* for inet_ntop */
 #include <assert.h>
 #include <string.h> /* for memcmp */
 #include <netdb.h> /* for getaddrinfo */
diff --git a/addr.h b/addr.h
index 2fd2ca1..ea2ae3f 100644 (file)
--- a/addr.h
+++ b/addr.h
@@ -10,7 +10,8 @@
 #ifndef __DARKSTAT_ADDR_H
 #define __DARKSTAT_ADDR_H
 
-#include <arpa/inet.h>
+#include <sys/socket.h> /* for AF_INET6 */
+#include <netinet/in.h> /* for in6_addr */
 
 struct addr {
    union {
index f9ed169..69d6544 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef __DARKSTAT_HOSTS_DB_H
 #define __DARKSTAT_HOSTS_DB_H
 
+#include <sys/types.h> /* for time_t and uint64_t (esp on FreeBSD) */
+
 #include "addr.h"
 
 struct hashtable;