Lines 30-41
Link Here
|
30 |
|
30 |
|
31 |
#include <tcpdump-stdinc.h> |
31 |
#include <tcpdump-stdinc.h> |
32 |
|
32 |
|
33 |
#ifdef HAVE_GETRPCBYNUMBER |
33 |
#if defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H) |
34 |
#include <rpc/rpc.h> |
34 |
#include <rpc/rpc.h> |
35 |
#ifdef HAVE_RPC_RPCENT_H |
35 |
#ifdef HAVE_RPC_RPCENT_H |
36 |
#include <rpc/rpcent.h> |
36 |
#include <rpc/rpcent.h> |
37 |
#endif /* HAVE_RPC_RPCENT_H */ |
37 |
#endif /* HAVE_RPC_RPCENT_H */ |
38 |
#endif /* HAVE_GETRPCBYNUMBER */ |
38 |
#endif /* defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H) */ |
39 |
|
39 |
|
40 |
#include <stdio.h> |
40 |
#include <stdio.h> |
41 |
#include <string.h> |
41 |
#include <string.h> |
Lines 136-142
Link Here
|
136 |
progstr(prog) |
136 |
progstr(prog) |
137 |
u_int32_t prog; |
137 |
u_int32_t prog; |
138 |
{ |
138 |
{ |
139 |
#ifdef HAVE_GETRPCBYNUMBER |
139 |
#if defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H) |
140 |
register struct rpcent *rp; |
140 |
register struct rpcent *rp; |
141 |
#endif |
141 |
#endif |
142 |
static char buf[32]; |
142 |
static char buf[32]; |
Lines 144-155
Link Here
|
144 |
|
144 |
|
145 |
if (lastprog != 0 && prog == lastprog) |
145 |
if (lastprog != 0 && prog == lastprog) |
146 |
return (buf); |
146 |
return (buf); |
147 |
#ifdef HAVE_GETRPCBYNUMBER |
147 |
#if defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H) |
148 |
rp = getrpcbynumber(prog); |
148 |
rp = getrpcbynumber(prog); |
149 |
if (rp == NULL) |
149 |
if (rp == NULL) |
150 |
#endif |
150 |
#endif |
151 |
(void) snprintf(buf, sizeof(buf), "#%u", prog); |
151 |
(void) snprintf(buf, sizeof(buf), "#%u", prog); |
152 |
#ifdef HAVE_GETRPCBYNUMBER |
152 |
#if defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H) |
153 |
else |
153 |
else |
154 |
strlcpy(buf, rp->r_name, sizeof(buf)); |
154 |
strlcpy(buf, rp->r_name, sizeof(buf)); |
155 |
#endif |
155 |
#endif |