summaryrefslogtreecommitdiff
path: root/print-sunrpc.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@steve.local>2009-07-02 18:43:40 -0700
committerGuy Harris <gharris@steve.local>2009-07-02 18:43:40 -0700
commitc6461afb669c63336f49b07e5ce489616a60c249 (patch)
tree8e12e0e994984a60975f8a62c95836c307f905ea /print-sunrpc.c
parent7c567e9ae828fc6866cf9f0bd91c9e7f05f51b0f (diff)
downloadtcpdump-c6461afb669c63336f49b07e5ce489616a60c249.tar.gz
At least on HP-UX:
1) getrpcbynumber() is declared in <netdb.h>, not any of the RPC header files and 2) if _XOPEN_SOURCE_EXTENDED is defined, <netdb.h> doesn't declare it so we undefine it.
Diffstat (limited to 'print-sunrpc.c')
-rw-r--r--print-sunrpc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/print-sunrpc.c b/print-sunrpc.c
index bfb2fe9a..e33b7625 100644
--- a/print-sunrpc.c
+++ b/print-sunrpc.c
@@ -28,6 +28,21 @@ static const char rcsid[] _U_ =
#include "config.h"
#endif
+/*
+ * At least on HP-UX:
+ *
+ * 1) getrpcbynumber() is declared in <netdb.h>, not any of the RPC
+ * header files
+ *
+ * and
+ *
+ * 2) if _XOPEN_SOURCE_EXTENDED is defined, <netdb.h> doesn't declare
+ * it
+ *
+ * so we undefine it.
+ */
+#undef _XOPEN_SOURCE_EXTENDED
+
#include <tcpdump-stdinc.h>
#ifdef HAVE_GETRPCBYNUMBER