On Sat, 30 Sep 2006, Dag-Erling Sm?rgrav wrote:
> FreeBSD's <net/if_tap.h> requires u_char to be defined:
>
> checking net/if_tap.h usability... no
> checking net/if_tap.h presence... yes
> configure: WARNING: net/if_tap.h: present but cannot be compiled
> configure: WARNING: net/if_tap.h: check for missing prerequisite
headers?
Does the attached patch to configure.ac help?
--
Tim Rice Multitalents (707) 887-1469
tim at multitalents.net
-------------- next part --------------
--- configure.ac.old 2006-09-30 12:51:23.798481001 -0700
+++ configure.ac 2006-09-30 14:11:42.008801092 -0700
@@ -379,15 +379,7 @@
;;
esac
# tun(4) forwarding compat code
- AC_CHECK_HEADERS(linux/if_tun.h)
- if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
- AC_DEFINE(SSH_TUN_LINUX, 1,
- [Open tunnel devices the Linux tun/tap way])
- AC_DEFINE(SSH_TUN_COMPAT_AF, 1,
- [Use tunnel device compatibility to OpenBSD])
- AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
- [Prepend the address family to IP tunnel traffic])
- fi
+ check_linux_if_tun_h=yes
;;
mips-sony-bsd|mips-sony-newsos4)
AC_DEFINE(NEED_SETPGRP, 1, [Need setpgrp to acquire controlling tty])
@@ -399,8 +391,7 @@
need_dash_r=1
fi
AC_DEFINE(SSH_TUN_FREEBSD, 1, [Open tunnel devices the FreeBSD way])
- AC_CHECK_HEADER([net/if_tap.h], ,
- AC_DEFINE(SSH_TUN_NO_L2, 1, [No layer 2 tunnel support]))
+ check_net_if_tun_h=yes
AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
[Prepend the address family to IP tunnel traffic])
;;
@@ -808,6 +799,22 @@
#include <sys/types.h>
])
+if test "x$check_linux_if_tun_h" = "xyes" ; then
+ AC_CHECK_HEADERS(linux/if_tun.h)
+ if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
+ AC_DEFINE(SSH_TUN_LINUX, 1,
+ [Open tunnel devices the Linux tun/tap way])
+ AC_DEFINE(SSH_TUN_COMPAT_AF, 1,
+ [Use tunnel device compatibility to OpenBSD])
+ AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
+ [Prepend the address family to IP tunnel traffic])
+ fi
+fi
+if test "x$check_net_if_tun_h" = "xyes" ; then
+ AC_CHECK_HEADER([net/if_tap.h], ,
+ AC_DEFINE(SSH_TUN_NO_L2, 1, [No layer 2 tunnel support]))
+fi
+
# Checks for libraries.
AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))