tcpdump mailing list archives
[PATCH] vlan: Fix Linux VLAN accel compile test under GCC 4.4
From: Jesper Dangaard Brouer <hawk () comx dk>
Date: Mon, 31 Jan 2011 14:40:30 +0100
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 <sys/types.h>. 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. Notice, that this patch only change aclocal.m4, you need to run a tool like 'autoreconf -fi' to generate the configure script again. Signed-off-by: Jesper Dangaard Brouer <hawk () comx dk> --- aclocal.m4 | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 2cce559..20db44f 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 <sys/types.h> # include <linux/if_packet.h>], [u_int i = sizeof(((struct tpacket_auxdata *)0)->tp_vlan_tci)], ac_cv_lbl_linux_tpacket_auxdata_tp_vlan_tci=yes, - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- [PATCH] vlan: Fix Linux VLAN accel compile test under GCC 4.4 Jesper Dangaard Brouer (Jan 31)
- Re: [PATCH] vlan: Fix Linux VLAN accel compile test under GCC 4.4 Guy Harris (Feb 01)