diff options
-rw-r--r-- | config.h.in | 3 | ||||
-rwxr-xr-x | configure | 3 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | print-sunrpc.c | 10 |
4 files changed, 11 insertions, 7 deletions
diff --git a/config.h.in b/config.h.in index 5ecbd7dd..9ee068be 100644 --- a/config.h.in +++ b/config.h.in @@ -162,6 +162,9 @@ /* 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 @@ -3989,7 +3989,8 @@ done -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 diff --git a/configure.in b/configure.in index 96d89831..4ac664ec 100644 --- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ AC_C___ATTRIBUTE__ 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>]) diff --git a/print-sunrpc.c b/print-sunrpc.c index e33b7625..21cd85a9 100644 --- a/print-sunrpc.c +++ b/print-sunrpc.c @@ -45,12 +45,12 @@ static const char rcsid[] _U_ = #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> @@ -151,7 +151,7 @@ static char * 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]; @@ -159,12 +159,12 @@ progstr(prog) 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 |