$NetBSD: patch-ae,v 1.3 2008/10/09 10:57:23 sborrill Exp $
--- configure.ac.orig	2008-10-06 08:22:21.000000000 +0100
+++ configure.ac	2008-10-09 10:03:55.000000000 +0100
@@ -343,14 +343,17 @@
 		 sys/mman.h fcntl.h sys/file.h stdlib.h stdint.h dnl
 		 stdarg.h unistd.h signal.h stdio.h string.h dnl
 		 strings.h ctype.h errno.h syslog.h pwd.h grp.h dnl
-		 net/if_tun.h net/tun/if_tun.h stropts.h sys/sockio.h dnl
+		 net/if_tap.h net/if_tun.h net/tun/if_tun.h stropts.h sys/sockio.h dnl
 		 netinet/in.h netinet/in_systm.h dnl
 		 netinet/tcp.h arpa/inet.h dnl
 		 netdb.h sys/uio.h linux/if_tun.h linux/sockios.h dnl
 		 linux/types.h sys/poll.h sys/epoll.h err.h dnl
    )
    AC_CHECK_HEADERS(net/if.h,,,
-		 [#ifdef HAVE_SYS_SOCKET_H 
+		 [#ifdef HAVE_SYS_TYPES_H 
+		  # include <sys/types.h>
+		  #endif
+		  #ifdef HAVE_SYS_SOCKET_H 
 		  # include <sys/socket.h>
 		  #endif
 		 ])
@@ -372,6 +375,9 @@
 		  #ifdef HAVE_SYS_SOCKET_H
 		  # include <sys/socket.h>
 		  #endif
+		  #ifdef HAVE_NET_IF_H
+		  # include <net/if.h>
+		  #endif
 		  #ifdef HAVE_NETINET_IN_H
 		  # include <netinet/in.h>
 		  #endif
