3 @@ -79,22 +79,6 @@ typedef unsigned long rpcport_t;
7 -#ifndef __u_char_defined
8 -typedef __u_char u_char;
9 -typedef __u_short u_short;
10 -typedef __u_int u_int;
11 -typedef __u_long u_long;
12 -typedef __quad_t quad_t;
13 -typedef __u_quad_t u_quad_t;
14 -typedef __fsid_t fsid_t;
15 -# define __u_char_defined
17 -#ifndef __daddr_t_defined
18 -typedef __daddr_t daddr_t;
19 -typedef __caddr_t caddr_t;
20 -# define __daddr_t_defined
24 #include <sys/param.h>
29 #include <sys/types.h>
30 #include <sys/socket.h>
31 #include <netinet/in.h>
39 #define _RPC_NETDB_H 1
49 +#ifndef NETDB_INTERNAL
50 +#define NETDB_INTERNAL -1
59 __UCLIBC_MUTEX_STATIC(mylock, PTHREAD_MUTEX_INITIALIZER);
61 static smallint is_initialized;
62 -static struct drand48_data __rpc_lrand48_data;
64 u_long _create_xid (void) attribute_hidden;
65 u_long _create_xid (void)
66 @@ -45,11 +44,11 @@ u_long _create_xid (void)
69 gettimeofday (&now, (struct timezone *) 0);
70 - srand48_r (now.tv_sec ^ now.tv_usec, &__rpc_lrand48_data);
71 + srand48 (now.tv_sec ^ now.tv_usec);
75 - lrand48_r (&__rpc_lrand48_data, &res);
78 __UCLIBC_MUTEX_UNLOCK(mylock);
82 @@ -58,7 +58,7 @@ static char sccsid[] = "@(#)clnt_tcp.c 1
86 -#include <sys/poll.h>
88 #include <sys/socket.h>
89 #include <rpc/pmap_clnt.h>
93 @@ -45,7 +45,7 @@ static char sccsid[] = "@(#)clnt_udp.c 1
97 -#include <sys/poll.h>
99 #include <sys/socket.h>
100 #include <sys/ioctl.h>
108 -#include <sys/poll.h>
110 #include <sys/socket.h>
111 #include <rpc/pmap_clnt.h>
115 @@ -48,7 +48,7 @@ static char sccsid[] = "@(#)pmap_rmt.c 1
116 #include <rpc/pmap_prot.h>
117 #include <rpc/pmap_clnt.h>
118 #include <rpc/pmap_rmt.h>
119 -#include <sys/poll.h>
121 #include <sys/socket.h>
126 @@ -62,9 +62,10 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (
127 #define __UCLIBC_HIDE_DEPRECATED__
128 #include <features.h>
129 #include <sys/param.h>
130 -#include <sys/poll.h>
132 #include <sys/socket.h>
133 #include <sys/stat.h>
134 +#include <sys/types.h>
136 #include <netinet/in.h>
137 #include <arpa/inet.h>
138 @@ -86,6 +87,11 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (
142 +#ifndef _PATH_HEQUIV
143 +#define _PATH_HEQUIV "/etc/hosts.equiv"
146 +int rresvport(int *alport);
148 /* some forward declarations */
149 static int __ivaliduser2(FILE *hostf, u_int32_t raddr,
150 @@ -106,7 +112,7 @@ int rcmd(char **ahost, u_short rport, co
152 struct sockaddr_in sin, from;
153 struct pollfd pfd[2];
155 + sigset_t sig, osig;
159 @@ -145,7 +151,9 @@ int rcmd(char **ahost, u_short rport, co
160 pfd[1].events = POLLIN;
163 - oldmask = sigblock(sigmask(SIGURG)); /* __sigblock */
165 + sigaddset(&sig, SIGURG);
166 + sigprocmask(SIG_BLOCK, &sig, &osig);
167 for (timo = 1, lport = IPPORT_RESERVED - 1;;) {
168 s = rresvport(&lport);
170 @@ -154,7 +162,7 @@ int rcmd(char **ahost, u_short rport, co
171 "rcmd: socket: All ports in use\n");
173 (void)fprintf(stderr, "rcmd: socket: %m\n");
174 - sigsetmask(oldmask); /* sigsetmask */
175 + sigprocmask(SIG_SETMASK, &osig, NULL);
178 fcntl(s, F_SETOWN, pid);
179 @@ -189,7 +197,7 @@ int rcmd(char **ahost, u_short rport, co
182 (void)fprintf(stderr, "%s: %m\n", hp->h_name);
183 - sigsetmask(oldmask); /* __sigsetmask */
184 + sigprocmask(SIG_SETMASK, &osig, NULL);
188 @@ -256,14 +264,14 @@ int rcmd(char **ahost, u_short rport, co
192 - sigsetmask(oldmask);
193 + sigprocmask(SIG_SETMASK, &osig, NULL);
200 - sigsetmask(oldmask);
201 + sigprocmask(SIG_SETMASK, &osig, NULL);
208 #define __UCLIBC_HAS_THREADS__
211 -#include <sys/poll.h>
216 --- a/rpc_commondata.c
217 +++ b/rpc_commondata.c
219 * Mountain View, California 94043
222 -#include <sys/poll.h>
224 #include <sys/select.h>
229 @@ -51,13 +51,16 @@ static char sccsid[] = "@(#)rtime.c 2.2
231 #include <rpc/clnt.h>
232 #include <sys/types.h>
233 -#include <sys/poll.h>
235 #include <sys/socket.h>
236 #include <sys/time.h>
237 #include <rpc/auth_des.h>
239 #include <netinet/in.h>
241 +#ifndef IPPORT_TIMESERVER
242 +#define IPPORT_TIMESERVER 37
245 #define NYEARS (u_long)(1970 - 1900)
246 #define TOFFSET (u_long)(60*60*24*(365*NYEARS + (NYEARS/4)))
250 #include "rpc_private.h"
252 #include <rpc/pmap_clnt.h>
253 -#include <sys/poll.h>
256 /* used by svc_[max_]pollfd */
257 /* used by svc_fdset */
264 -#include <sys/poll.h>
268 /* used by svc_[max_]pollfd */
271 @@ -49,7 +49,7 @@ static char sccsid[] = "@(#)svc_tcp.c 1.
274 #include <sys/socket.h>
275 -#include <sys/poll.h>
284 #include <sys/socket.h>
286 -#include <sys/poll.h>
294 #include <features.h>
295 #include <sys/socket.h>
296 #include <netinet/in.h>
297 -#include <netipx/ipx.h>
300 +#include <netipx/ipx.h>
301 #include <netash/ash.h>
302 #include <netatalk/at.h>
303 #include <netax25/ax25.h>
304 @@ -49,13 +49,13 @@ int __libc_sa_len (sa_family_t af)
305 return sizeof (struct sockaddr_rose);
307 return sizeof (struct sockaddr_ll);
309 + return sizeof (struct sockaddr_ipx);
312 return sizeof (struct sockaddr_in);
314 return sizeof (struct sockaddr_in6);
316 - return sizeof (struct sockaddr_ipx);
318 return sizeof (struct sockaddr_un);
322 @@ -55,7 +55,7 @@ static char sccsid[] = "@(#)xdr_float.c
323 * This routine works on Suns (Sky / 68000's) and Vaxen.
326 -#define LSW (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
327 +#define LSW (__BYTE_ORDER == __BIG_ENDIAN)