mirror of
https://github.com/samhocevar/rinetd.git
synced 2025-03-22 15:50:08 +08:00
Fix minor compilation warnings on mingw64.
This commit is contained in:
parent
8bde6f6259
commit
2681d17eb4
@ -645,7 +645,7 @@ static void handleAccept(ServerInfo const *srv)
|
|||||||
/* In TCP mode, get remote address using accept(). */
|
/* In TCP mode, get remote address using accept(). */
|
||||||
nfd = accept(srv->fd, &addr, &addrlen);
|
nfd = accept(srv->fd, &addr, &addrlen);
|
||||||
if (nfd == INVALID_SOCKET) {
|
if (nfd == INVALID_SOCKET) {
|
||||||
syslog(LOG_ERR, "accept(%d): %m\n", srv->fd);
|
syslog(LOG_ERR, "accept(%llu): %m\n", (long long unsigned int)srv->fd);
|
||||||
logEvent(NULL, srv, logAcceptFailed);
|
logEvent(NULL, srv, logAcceptFailed);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -666,7 +666,7 @@ static void handleAccept(ServerInfo const *srv)
|
|||||||
if (GetLastError() == WSAEINPROGRESS) {
|
if (GetLastError() == WSAEINPROGRESS) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
syslog(LOG_ERR, "recvfrom(%d): %m\n", srv->fd);
|
syslog(LOG_ERR, "recvfrom(%llu): %m\n", (long long unsigned int)srv->fd);
|
||||||
logEvent(NULL, srv, logAcceptFailed);
|
logEvent(NULL, srv, logAcceptFailed);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -774,7 +774,8 @@ static void handleAccept(ServerInfo const *srv)
|
|||||||
/* Send a zero-size UDP packet to simulate a connection */
|
/* Send a zero-size UDP packet to simulate a connection */
|
||||||
if (srv->toProto == protoUdp) {
|
if (srv->toProto == protoUdp) {
|
||||||
int got = sendto(cnx->local.fd, NULL, 0, 0,
|
int got = sendto(cnx->local.fd, NULL, 0, 0,
|
||||||
&saddr, (SOCKLEN_T)sizeof(saddr));
|
(struct sockaddr const *)&saddr,
|
||||||
|
(SOCKLEN_T)sizeof(saddr));
|
||||||
/* FIXME: we ignore errors here... is it safe? */
|
/* FIXME: we ignore errors here... is it safe? */
|
||||||
(void)got;
|
(void)got;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user