]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Include our own "nameser.h", rather than the system's <arpa/nameser.h>,
authorguy <guy>
Fri, 14 Jul 2000 02:49:00 +0000 (02:49 +0000)
committerguy <guy>
Fri, 14 Jul 2000 02:49:00 +0000 (02:49 +0000)
to get NAMESERVER_PORT defined.

<arpa/nameser.h> defines T_UNSPEC; that causes collisions on Solaris
(and probably at least some other OSes) with stuff included by
<rpc/rpc.h>, generating noise when compiling.  Move the include of
"nameser.h" near the includes of other protocol-defining header
files in tcpdump; this also moves it below the include of <rpc/rpc.h>,
so we can then move the #undefs of NOERROR and T_UNSPEC below most
includes and still have it before the include of "nameser.h", squelching
the compiler complaints.

print-udp.c

index e44cabff7a07fd1cf19a2e7703d65494841c8780..ec26fcef02a33f2ea6fa28e63d395e1d52fa8464 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.73 2000-04-27 11:09:08 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.74 2000-07-14 02:49:00 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -39,13 +39,6 @@ static const char rcsid[] =
 #include <netinet/udp.h>
 #include <netinet/udp_var.h>
 
-#ifdef NOERROR
-#undef NOERROR                                 /* Solaris sucks */
-#endif
-#ifdef T_UNSPEC
-#undef T_UNSPEC                                        /* SINIX does too */
-#endif
-#include <arpa/nameser.h>
 #ifdef SEGSIZE
 #undef SEGSIZE
 #endif
@@ -63,6 +56,13 @@ static const char rcsid[] =
 #include "addrtoname.h"
 #include "appletalk.h"
 
+#ifdef NOERROR
+#undef NOERROR                                 /* Solaris sucks */
+#endif
+#ifdef T_UNSPEC
+#undef T_UNSPEC                                        /* SINIX does too */
+#endif
+#include "nameser.h"
 #include "nfs.h"
 #include "bootp.h"