CURLcode code;
int rc;
struct Curl_sockaddr_storage fromaddr;
- RECVFROM_ARG6_T fromlen;
+ socklen_t fromlen;
int check_time = 0;
struct SingleRequest *k = &data->req;
else {
/* Receive the packet */
- fromlen = (RECVFROM_ARG6_T)sizeof(fromaddr);
- state->rbytes = sreadfrom(state->sockfd,
- &state->rpacket, sizeof(state->rpacket),
- &fromaddr, &fromlen);
+ fromlen = sizeof(fromaddr);
+ state->rbytes = (ssize_t)recvfrom(state->sockfd,
+ (void *)&state->rpacket,
+ sizeof(state->rpacket),
+ 0,
+ (struct sockaddr *)&fromaddr,
+ &fromlen);
if(state->remote_addrlen==0) {
memcpy(&state->remote_addr, &fromaddr, fromlen);
state->remote_addrlen = fromlen;
static char buf[PKTSIZE];
static char ackbuf[PKTSIZE];
static struct sockaddr_in from;
-static RECVFROM_ARG6_T fromlen;
+static socklen_t fromlen;
struct bf {
int counter; /* size of data in buffer, or flag */
int j = 0;
char rbuf[PKTSIZE];
struct sockaddr_in fromaddr;
- RECVFROM_ARG6_T fromaddrlen;
+ socklen_t fromaddrlen;
while (1) {
#if defined(HAVE_IOCTLSOCKET)
#endif
if (i) {
j++;
- fromaddrlen = (RECVFROM_ARG6_T)sizeof(fromaddr);
- (void)sreadfrom(f, rbuf, sizeof(rbuf), &fromaddr, &fromaddrlen);
+ fromaddrlen = sizeof(fromaddr);
+ (void)recvfrom(f, rbuf, sizeof(rbuf), 0,
+ (struct sockaddr *)&fromaddr, &fromaddrlen);
}
else
break;
, port );
do {
- fromlen = (RECVFROM_ARG6_T)sizeof(from);
- n = sreadfrom(sock, buf, sizeof(buf), &from, &fromlen);
+ fromlen = sizeof(from);
+ n = (ssize_t)sreadfrom(sock, buf, sizeof(buf), 0,
+ (struct sockaddr *)&from, &fromlen);
if (n < 0) {
logmsg("recvfrom:\n");
result = 3;