--- configure.orig	Fri Dec  2 13:21:30 2011
+++ configure	Mon May  7 22:20:59 2012
@@ -5325,6 +5325,7 @@ _ACEOF
 
 
 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
+#include <sys/types.h>
 #include <netinet/in.h>
 #ifdef HAVE_SOCKET_H
 #include <socket.h>
@@ -5342,6 +5343,7 @@ fi
 
 
 ac_fn_c_check_type "$LINENO" "struct in_addr" "ac_cv_type_struct_in_addr" "
+#include <sys/types.h>
 #include <netinet/in.h>
 
 "
