diff --git a/iodined.c b/iodined.c
index 06cc2d3..1820403 100644
--- a/iodined.c
+++ b/iodined.c
@@ -27,6 +27,7 @@
 #include <err.h>
 #include <pwd.h>
 #include <arpa/inet.h>
+#include <netinet/in.h>
 #include <zlib.h>
 
 #include "tun.h"
diff --git a/tun.c b/tun.c
index 7622f16..8a7c00f 100644
--- a/tun.c
+++ b/tun.c
@@ -25,6 +25,7 @@
 #include <fcntl.h>
 #include <err.h>
 #include <arpa/inet.h>
+#include <netinet/in.h>
 
 #include "tun.h"