From 35a14eb7c075df4acbaf451b257b0d8ae09f9ee4 Mon Sep 17 00:00:00 2001 From: Jesper Dangaard Brouer Date: Tue, 1 Feb 2011 11:39:51 -0800 Subject: Fix configure-script discovery of VLAN acceleration support. VLAN acceleration support is broken, when using GCC compiler >= 4.4 (tested with gcc version 4.4.5 (Debian 4.4.5-4)), due to the configure script. GCC 4.4 does not indirectly include the type of u_int, which the configure code choose to use for this test. Thus, the if_packet check fails due to the error: 'u_int' undeclared, eventhough the header file if_packet.h contains the correct structs. Fix the AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI macro compile test, by simply including . A longer description is available on my blog here: http://netoptimizer.blogspot.com/2010/09/tcpdump-vs-vlan-tags.html Also fix the wrong AC_CACHE_VAL. Reviewed-By: Guy Harris --- aclocal.m4 | 3 ++- configure | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 2cce559a..20db44fa 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -995,8 +995,9 @@ dnl code that would use that member, or we wouldn't compile in any case). dnl AC_DEFUN(AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI, [AC_MSG_CHECKING(if tpacket_auxdata struct has tp_vlan_tci member) - AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1, + AC_CACHE_VAL(ac_cv_lbl_linux_tpacket_auxdata_tp_vlan_tci, AC_TRY_COMPILE([ +# include # include ], [u_int i = sizeof(((struct tpacket_auxdata *)0)->tp_vlan_tci)], ac_cv_lbl_linux_tpacket_auxdata_tp_vlan_tci=yes, diff --git a/configure b/configure index acb523b2..2afb6dff 100755 --- a/configure +++ b/configure @@ -7577,7 +7577,7 @@ _ACEOF fi { echo "$as_me:$LINENO: checking if tpacket_auxdata struct has tp_vlan_tci member" >&5 echo $ECHO_N "checking if tpacket_auxdata struct has tp_vlan_tci member... $ECHO_C" >&6; } - if test "${ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1+set}" = set; then + if test "${ac_cv_lbl_linux_tpacket_auxdata_tp_vlan_tci+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -7587,6 +7587,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +# include # include int main () -- cgit v1.2.3