This set of diffs is required to correct a problem when compiling libpcap on Solaris 11 due to the assumption that the presence of AF_PACKET implies certain header files are in certain positions. The failure (without the patch) is demonstrated as follows:
gcc -O2 -fpic -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./fad-getad.c
./fad-getad.c:69:27: linux/types.h: No such file or directory ./fad-getad.c:70:31: linux/if_packet.h: No such file or directory Darren
diff -u libpcap-clone/configure.in libpcap/configure.in --- libpcap-clone/configure.in Fri Jun 3 20:41:14 2011 +++ libpcap/configure.in Fri Jun 3 20:52:20 2011 @@ -103,6 +103,8 @@ dnl "AC_LBL_FIXINCLUDES" wouldn't work on some platforms such as Solaris. dnl AC_CHECK_HEADERS(sys/ioccom.h sys/sockio.h limits.h paths.h) +AC_CHECK_HEADERS(linux/types.h) +AC_CHECK_HEADERS(linux/if_packet.h netpacket/packet.h netpacket/if_packet.h) AC_CHECK_HEADERS(net/pfvar.h, , , [#include <sys/types.h> #include <sys/socket.h> #include <net/if.h>]) Only in libpcap: configure.in.mine Only in libpcap: configure.in.orig Only in libpcap: diffs Common subdirectories: libpcap-clone/doc and libpcap/doc Only in libpcap: etherent.o diff -u libpcap-clone/fad-getad.c libpcap/fad-getad.c --- libpcap-clone/fad-getad.c Fri Jun 3 20:41:14 2011 +++ libpcap/fad-getad.c Wed Sep 15 20:08:58 2010 @@ -61,12 +61,16 @@ #endif #ifdef AF_PACKET -# ifdef __Lynx__ -/* LynxOS */ +# ifdef HAVE_NETPACKET_PACKET_H +# include <netpacket/packet.h> +# endif +# ifdef HAVE_NETPACKET_IF_PACKET_H # include <netpacket/if_packet.h> -# else -/* Linux */ +# endif +# ifdef HAVE_LINUX_TYPES_H # include <linux/types.h> +# endif +# ifdef HAVE_LINUX_IF_PACKET_H # include <linux/if_packet.h> # endif #endif
- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
