I sent a report on this previously, but it didn't seem to go through on the list.

This is with the 2005-04-26 snapshot:

One problem occurs because of FreeBSD's #define of __ntohl as an inline asm function conflicts with the one in tcpdump-stdinc.h. Patch to fix this follows:

--- tcpdump-stdinc.h    Wed Apr 20 05:44:32 2005
+++ tcpdump-stdinc.h.fix        Tue Apr 26 18:19:27 2005
@@ -129,7 +129,7 @@
  #define FOPEN_WRITE_BIN  FOPEN_WRITE_TXT
#endif

-#if defined(__GNUC__) && defined(__i386__)
+#if defined(__GNUC__) && defined(__i386__) && !defined(__ntohl)
  #undef ntohl
  #undef ntohs
  #undef htonl

Another occurs because FreeBSD 5.2 uses a different multiple include prevention for <rpc/pmap_proto.h> than is recognized by the libpcap version. Rather than add a third check, it seemed to make more sense to just conditionalize this code on some #defines that any version of pmap_proto.h would use:

--- pmap_prot.h Wed Apr 6 21:27:52 2005
+++ pmap_prot.h.fix Wed Apr 27 08:36:35 2005
@@ -69,10 +69,11 @@
* The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
*/


-#if !defined(_RPC_PMAP_PROT_H_) && !defined(_RPC_PMAPPROT_H)
+#if !defined(PMAPPROC_NULL) && !defined(PMAPVERS)

-/* two defines, for NetBSD and FreeBSD */
+/* three defines, for NetBSD and FreeBSD 4 and 5 */
#define _RPC_PMAP_PROT_H_
+#define _RPC_PMAP_PROT_H
#define _RPC_PMAPPROT_H

#define PMAPPORT               ((u_int16_t)111)

@alex


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

Reply via email to