mirror of
https://github.com/samhocevar/rinetd.git
synced 2025-03-14 20:00:11 +08:00
Minor #ifdef cleanup.
This commit is contained in:
parent
ff3974440e
commit
e35403e112
8
rinetd.c
8
rinetd.c
@ -660,15 +660,13 @@ static void handleAccept(ServerInfo const *srv)
|
||||
memcpy(&saddr.sin_addr, &srv->localAddr, sizeof(struct in_addr));
|
||||
saddr.sin_port = srv->localPort;
|
||||
|
||||
#ifndef _WIN32
|
||||
#ifdef __linux__
|
||||
#if defined __linux__
|
||||
int tmp = 0;
|
||||
setsockopt(cnx->local.fd, SOL_SOCKET, SO_LINGER, &tmp, sizeof(tmp));
|
||||
#else
|
||||
#elif !defined _WIN32
|
||||
int tmp = 1024;
|
||||
setsockopt(cnx->local.fd, SOL_SOCKET, SO_SNDBUF, &tmp, sizeof(tmp));
|
||||
#endif /* __linux__ */
|
||||
#endif /* _WIN32 */
|
||||
#endif
|
||||
|
||||
FIONBIO_ARG_T ioctltmp = 1;
|
||||
ioctlsocket(cnx->local.fd, FIONBIO, &ioctltmp);
|
||||
|
Loading…
Reference in New Issue
Block a user