Package: cheops Version: 0.61-15 Severity: serious cheops fails to build because it does not use the BSD struct tcphdr definition:
gcc -g -O2 -Wall -DDEFAULT_PATH=\"/usr/share/cheops\" -DLIB_PATH=\"/usr/lib/cheops\" -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -DHAS_GMODULE -DNETSNMP_ENABLE_IPV6 -g -Wall -O2 -DNETSNMP_USE_INLINE -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.8/CORE -I. -I/usr/include -DSNMP -DNETSNMP_ENABLE_IPV6 -g -Wall -O2 -DNETSNMP_USE_INLINE -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.8/CORE -I. -I/usr/include -c -o tcpip-mod.o tcpip-mod.c tcpip-mod.c: In function 'sendtcp': tcpip-mod.c:180: error: 'struct tcphdr' has no member named 'th_sport' tcpip-mod.c:181: error: 'struct tcphdr' has no member named 'th_dport' tcpip-mod.c:182: error: 'struct tcphdr' has no member named 'th_seq' tcpip-mod.c:183: error: 'struct tcphdr' has no member named 'th_ack' tcpip-mod.c:187: error: 'struct tcphdr' has no member named 'th_x2' tcpip-mod.c:188: error: 'struct tcphdr' has no member named 'th_off' tcpip-mod.c:190: error: 'struct tcphdr' has no member named 'th_flags' tcpip-mod.c:191: error: 'struct tcphdr' has no member named 'th_win' tcpip-mod.c:192: error: 'struct tcphdr' has no member named 'th_urp' tcpip-mod.c:193: error: 'struct tcphdr' has no member named 'th_sum' tcpip-mod.c:196: error: 'struct tcphdr' has no member named 'th_sum' tcpip-mod.c: In function 'sendicmp': tcpip-mod.c:264: error: 'struct udphdr' has no member named 'uh_ulen' tcpip-mod.c:265: error: 'struct udphdr' has no member named 'uh_sport' tcpip-mod.c:266: error: 'struct udphdr' has no member named 'uh_dport' tcpip-mod.c:267: error: 'struct udphdr' has no member named 'uh_sum' tcpip-mod.c:280: error: 'struct udphdr' has no member named 'uh_ulen' tcpip-mod.c:281: error: 'struct udphdr' has no member named 'uh_sum' tcpip-mod.c:282: error: 'struct udphdr' has no member named 'uh_sum' tcpip-mod.c:283: error: 'struct udphdr' has no member named 'uh_sum' tcpip-mod.c:284: error: 'struct udphdr' has no member named 'uh_sum' The attached patch fixes this by defining __FAVOR_BSD immediately before including netinet/tcp.h, as suggested by the Wikipedia entry: http://en.wikipedia.org/wiki/Tcphdr -- Matt
diff -ru cheops-0.61~/tcpip-mod.c cheops-0.61/tcpip-mod.c --- cheops-0.61~/tcpip-mod.c 2007-09-22 17:33:04.000000000 -0700 +++ cheops-0.61/tcpip-mod.c 2007-09-22 17:38:43.000000000 -0700 @@ -10,6 +10,7 @@ #include <sys/socket.h> #include <netinet/in_systm.h> #include <netinet/in.h> +#define __FAVOR_BSD #include <netinet/tcp.h> #include <netinet/ip.h> #include <netinet/ip_icmp.h>