mirror of
https://github.com/samhocevar/rinetd.git
synced 2025-03-14 20:00:11 +08:00
Fix Windows build.
This commit is contained in:
parent
a1d2c297ba
commit
a5905bbcea
@ -33,6 +33,9 @@
|
||||
<ClInclude Include="src\rinetd.h" />
|
||||
<ClInclude Include="src\types.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="src\parse.peg" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{3F1D9D58-3205-48E9-9C93-557291A45D74}</ProjectGuid>
|
||||
|
@ -12,6 +12,8 @@
|
||||
/* Define this to a reasonably large value */
|
||||
# define FD_SETSIZE 4096
|
||||
# include <winsock2.h>
|
||||
# include <ws2ipdef.h>
|
||||
# include <ws2tcpip.h>
|
||||
# include <windows.h>
|
||||
#else
|
||||
# include <sys/types.h>
|
||||
|
@ -654,6 +654,7 @@ static void handleAccept(ServerInfo const *srv)
|
||||
SOCKET nfd;
|
||||
if (srv->fromProto == protoTcp) {
|
||||
/* In TCP mode, get remote address using accept(). */
|
||||
// FIXME IPv6: need to reuse addrlen from the bind() call
|
||||
nfd = accept(srv->fd, &addr, &addrlen);
|
||||
if (nfd == INVALID_SOCKET) {
|
||||
syslog(LOG_ERR, "accept(%llu): %m\n", (long long unsigned int)srv->fd);
|
||||
|
Loading…
Reference in New Issue
Block a user