/* Define to 1 if you have the <rpc/rpcent.h> header file. */
#undef HAVE_RPC_RPCENT_H
+/* Define to 1 if you have the <rpc/rpc.h> header file. */
+#undef HAVE_RPC_RPC_H
+
/* Define to 1 if you have the `setlinebuf' function. */
#undef HAVE_SETLINEBUF
-for ac_header in fcntl.h rpc/rpcent.h netdnet/dnetdb.h
+
+for ac_header in fcntl.h rpc/rpc.h rpc/rpcent.h netdnet/dnetdb.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
if test "$ac_cv___attribute__" = "yes"; then
AC_C___ATTRIBUTE___FORMAT_FUNCTION_POINTER
fi
-AC_CHECK_HEADERS(fcntl.h rpc/rpcent.h netdnet/dnetdb.h)
+AC_CHECK_HEADERS(fcntl.h rpc/rpc.h rpc/rpcent.h netdnet/dnetdb.h)
AC_CHECK_HEADERS(net/pfvar.h, , , [#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>])
#include <tcpdump-stdinc.h>
-#ifdef HAVE_GETRPCBYNUMBER
+#if defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H)
#include <rpc/rpc.h>
#ifdef HAVE_RPC_RPCENT_H
#include <rpc/rpcent.h>
#endif /* HAVE_RPC_RPCENT_H */
-#endif /* HAVE_GETRPCBYNUMBER */
+#endif /* defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H) */
#include <stdio.h>
#include <string.h>
progstr(prog)
u_int32_t prog;
{
-#ifdef HAVE_GETRPCBYNUMBER
+#if defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H)
register struct rpcent *rp;
#endif
static char buf[32];
if (lastprog != 0 && prog == lastprog)
return (buf);
-#ifdef HAVE_GETRPCBYNUMBER
+#if defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H)
rp = getrpcbynumber(prog);
if (rp == NULL)
#endif
(void) snprintf(buf, sizeof(buf), "#%u", prog);
-#ifdef HAVE_GETRPCBYNUMBER
+#if defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H)
else
strlcpy(buf, rp->r_name, sizeof(buf));
#endif