3.7.1 does not build out of the box under Tru64 UNIX 5.1. The problem
is that including <netinet/in.h> defines 'struct arphdr' because it
brings in <net/if_arp.h>. Even though the definitions are identical,
the Tru64 UNIX C compiler generates an error about a duplicate
structure definition. I don't know if you'll like the patch to
print-arp.c but if you know a cleaner way let me know.

Also, Tru64 UNIX has <sys/bitypes.h> that defines some of the common
types checked for in the configure.in file. We include this if found
in config.h (new file config.h.bot below) so we don't have to do this
in most of the files.

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
--- configure.in.orig   Sat Feb 23 18:38:31 2002
+++ configure.in        Sun Feb 24 14:36:23 2002
@@ -392,6 +392,9 @@
        [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
        AC_REPLACE_FUNCS(inet_aton)])
 
+dnl check for arphdr struct
+AC_CHECK_TYPES([struct arphdr], , ,[#include <netinet/in.h>])
+
 dnl portability macros for getaddrinfo/getnameinfo
 dnl
 dnl Check for sa_len
@@ -554,6 +557,7 @@
        V_GROUP=bpf
 fi
 
+AC_CHECK_HEADERS(sys/bitypes.h)
 AC_LBL_CHECK_TYPE(u_int8_t, u_char)
 AC_LBL_CHECK_TYPE(int16_t, short)
 AC_LBL_CHECK_TYPE(u_int16_t, u_short)
--- print-arp.c.orig    Sun Feb 24 14:11:37 2002
+++ print-arp.c Sun Feb 24 14:33:59 2002
@@ -52,18 +52,22 @@
  * arp_tha and arp_tpa in that order, according to the lengths
  * specified.  Field names used correspond to RFC 826.
  */
+#ifndef HAVE_STRUCT_ARPHDR
 struct arphdr {
        u_short ar_hrd;         /* format of hardware address */
+#endif
 #define ARPHRD_ETHER   1       /* ethernet hardware format */
 #define ARPHRD_IEEE802 6       /* token-ring hardware format */
 #define ARPHRD_ARCNET  7       /* arcnet hardware format */
 #define ARPHRD_FRELAY  15      /* frame relay hardware format */
 #define ARPHRD_STRIP   23      /* Ricochet Starmode Radio hardware format */
 #define ARPHRD_IEEE1394        24      /* IEEE 1394 (FireWire) hardware format */
+#ifndef HAVE_STRUCT_ARPHDR
        u_short ar_pro;         /* format of protocol address */
        u_char  ar_hln;         /* length of hardware address */
        u_char  ar_pln;         /* length of protocol address */
        u_short ar_op;          /* one of: */
+#endif
 #define        ARPOP_REQUEST   1       /* request to resolve address */
 #define        ARPOP_REPLY     2       /* response to previous request */
 #define        ARPOP_REVREQUEST 3      /* request protocol address given hardware */
@@ -84,7 +88,9 @@
 #define ar_spa(ap)     (((const caddr_t)((ap)+1))+  (ap)->ar_hln)
 #define ar_tha(ap)     (((const caddr_t)((ap)+1))+  (ap)->ar_hln+(ap)->ar_pln)
 #define ar_tpa(ap)     (((const caddr_t)((ap)+1))+2*(ap)->ar_hln+(ap)->ar_pln)
+#ifndef HAVE_STRUCT_ARPHDR
 };
+#endif
 
 #define ARP_HDRLEN     8
 
--- /dev/null   Sun Feb 24 14:48:44 2002
+++ config.h.bot        Sat Feb 23 19:00:38 2002
@@ -0,0 +1,3 @@
+#ifdef HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h>
+#endif
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to