From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.10) Gecko/20050717 Firefox/1.0.6 Description of problem: When i try compiling snort i get this error: /usr/include/linux/if.h:59: error: redefinition of `struct ifmap' /usr/include/linux/if.h:77: error: redefinition of `struct ifreq' /usr/include/linux/if.h:126: error: redefinition of `struct ifconf' at the snort webpage i must read about the error: * Question: I am having problems compiling snort_inline. Here is a sample of the error messages I get during compilation: gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../src -I/usr/include/pcap -I../../src/output-plugins -I../../src/detection-plugins -I../../src/preprocessors -I/usr/include -g -O2 -Wall -DGIDS -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H -DLIBNET_LIL_ENDIAN -c `test -f 'spo_alert_fast.c' || echo './'`spo_alert_fast.c In file included from /usr/include/linux/netfilter_ipv4/ip_queue.h:10, from /usr/include/libipq.h:37, from ../../src/inline.h:8, from ../../src/snort.h:38, from spo_alert_fast.c:51: /usr/include/linux/if.h:59: redefinition of `struct ifmap' /usr/include/linux/if.h:77: redefinition of `struct ifreq' /usr/include/linux/if.h:126: redefinition of `struct ifconf' make[3]: *** [spo_alert_fast.o] Error 1 make[3]: Leaving directory `/home/matt/src/BUILD/snort-2.0.5/src/output-plugins' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/matt/src/BUILD/snort-2.0.5/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/matt/src/BUILD/snort-2.0.5' make: *** [all] Error 2 Answer: You need to update the kernel headers used by your glibc. A quick fix is to create a link between /usr/include and the include directory of your kernel source. For example, if you are trying to use this with kernel version 2.4.24, you can do the following: cd /usr/include mv linux linux.orig ln -s /usr/src/linux-2.4.24/include/linux linux Now simply go to your snort_inline directory and recompile (make clean first). ** That is, point to a set of "real" kernel includes instead of RH's glibc-kernheaders package. ** Version-Release number of selected component (if applicable): glibc-kernheaders-2.4-9.1.87 How reproducible: Always Steps to Reproduce: try to compile snort via rpmbuild --target i686 --with mysql --with inline --with flexresp --with mysql --rebuild snort-2.4.0-1.FC3.src.rpm Actual Results: get the error above Expected Results: working compiler session Additional info:
I can confirm that this still an issue on Fedora Croe 4.
This report targets the FC3 or FC4 products, which have now been EOL'd. Could you please check that it still applies to a current Fedora release, and either update the target product or close it ? Thanks.
I have tested it today with snort-2.6.1.2 on FC5 same error: /usr/include/linux/if.h:59: error: redefinition of 'struct ifmap' /usr/include/linux/if.h:77: error: redefinition of 'struct ifreq' /usr/include/linux/if.h:126: error: redefinition of 'struct ifconf'
On FC6 it compiles without any errors. rpmbuild -tb snort-2.6.1.2.tar.gz --with flexresp --with inline --with mysql --define "_smp_mflags -j1"
Fixed in Fedora 6 according to comment 4.