tcpdump mailing list archives

Re: Problem with libpcap


From: Chris Maynard <Chris.Maynard () gtech com>
Date: Wed, 31 Mar 2010 20:10:21 +0000 (UTC)

Guy Harris <guy <at> alum.mit.edu> writes:



On Dec 2, 2009, at 4:57 AM, Noro Hasina wrote:

hello!
I'm going to install snort2.8 but it depends on libpcap. So I try to  
install
it but it doesn't work this is the error :
gcc -O2 -fPIC -I.  -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c
./pcap-linux.c
gcc -O2 -fPIC -I.  -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c
./pcap-usb-linux.c
gcc -O2 -fPIC -I.  -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c
./fad-getad.c
In file included from ./fad-getad.c:67: /usr/include/linux/ 
if_packet.h:52:
error: expected specifier-qualifier-list before '__u32'
make: *** [fad-getad.o] Error 1
Could you help me please

On which version of which Linux distribution are you trying to compile  
libpcap?

Note also that your distribution probably has a package (RPM, dpkg,  
Gentoo package, Slackware package, etc.) for libpcap; if so, you  
should be able to install libpcap from that package (and your  
distribution might even have a package for Snort).



I encountered the same problem trying to compile the latest libpcap-1.1 sources
on a RHEL5 system.  I fixed it with the following patch to fad-getad.c:

--- libpcap-1.1/fad-getad.c     2010-03-11 20:56:53.000000000 -0500
+++ libpcap-1.1-mine/fad-getad.c        2010-03-31 16:05:56.000000000 -0400
@@ -64,6 +64,7 @@
 # ifdef __Lynx__
 #  include <netpacket/if_packet.h>     /* LynxOS */
 # else
+#  include <linux/types.h>
 #  include <linux/if_packet.h>         /* Linux */
 # endif
 #endif

- Chris



-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: