Line
Link Here
|
0 |
-- src/lib/rpc/svc.c (revision 1666) |
0 |
++ src/lib/rpc/svc.c (local) |
Lines 109-123
Link Here
|
|
|
109 |
if (sock > svc_maxfd) |
110 |
svc_maxfd = sock; |
109 |
#else |
111 |
#else |
|
|
112 |
if (sock > svc_maxfd) |
113 |
svc_maxfd = sock; |
110 |
#endif /* def FD_SETSIZE */ |
114 |
#endif /* def FD_SETSIZE */ |
111 |
if (sock > svc_maxfd) |
|
|
112 |
svc_maxfd = sock; |
113 |
} |
115 |
} |
114 |
|
116 |
|
115 |
/* |
117 |
/* |
116 |
-- src/lib/rpc/svc_tcp.c (revision 1666) |
118 |
++ src/lib/rpc/svc_tcp.c (local) |
Lines 54-59
Link Here
|
54 |
extern errno; |
54 |
extern errno; |
55 |
*/ |
55 |
*/ |
56 |
|
56 |
|
|
|
57 |
#ifndef FD_SETSIZE |
58 |
#ifdef NBBY |
59 |
#define NOFILE (sizeof(int) * NBBY) |
60 |
#else |
61 |
#define NOFILE (sizeof(int) * 8) |
62 |
#endif |
63 |
#endif |
64 |
|
57 |
/* |
65 |
/* |
58 |
* Ops vector for TCP/IP based rpc service handle |
66 |
* Ops vector for TCP/IP based rpc service handle |
59 |
*/ |
67 |
*/ |
Lines 221-226
Link Here
|
221 |
register SVCXPRT *xprt; |
221 |
register SVCXPRT *xprt; |
222 |
register struct tcp_conn *cd; |
222 |
register struct tcp_conn *cd; |
223 |
|
223 |
|
|
|
224 |
#ifdef FD_SETSIZE |
225 |
if (fd >= FD_SETSIZE) { |
226 |
(void) fprintf(stderr, "svc_tcp: makefd_xprt: fd too high\n"); |
227 |
xprt = NULL; |
228 |
goto done; |
229 |
} |
230 |
#else |
231 |
if (fd >= NOFILE) { |
232 |
(void) fprintf(stderr, "svc_tcp: makefd_xprt: fd too high\n"); |
233 |
xprt = NULL; |
234 |
goto done; |
235 |
} |
236 |
#endif |
224 |
xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT)); |
237 |
xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT)); |
225 |
if (xprt == (SVCXPRT *)NULL) { |
238 |
if (xprt == (SVCXPRT *)NULL) { |
226 |
(void) fprintf(stderr, "svc_tcp: makefd_xprt: out of memory\n"); |
239 |
(void) fprintf(stderr, "svc_tcp: makefd_xprt: out of memory\n"); |
Lines 271-276
Link Here
|
|
|
292 |
if (xprt == NULL) { |
293 |
close(sock); |
294 |
return (FALSE); |
295 |
} |