forked from Telodendria/Telodendria
Fix a few things to make Telodendria compile and run on Cygwin.
This commit is contained in:
parent
6992f36c86
commit
92cc2206a1
2 changed files with 3 additions and 1 deletions
|
@ -362,10 +362,12 @@ HttpServerCreate(unsigned short port, unsigned int nThreads, unsigned int maxCon
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SO_REUSEPORT
|
||||||
if (setsockopt(server->sd, SOL_SOCKET, SO_REUSEPORT, &ENABLE, sizeof(int)) < 0)
|
if (setsockopt(server->sd, SOL_SOCKET, SO_REUSEPORT, &ENABLE, sizeof(int)) < 0)
|
||||||
{
|
{
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
sa.sin_family = AF_INET;
|
sa.sin_family = AF_INET;
|
||||||
sa.sin_port = htons(port);
|
sa.sin_port = htons(port);
|
||||||
|
|
|
@ -135,7 +135,7 @@ UtilStringToBytes(char *str)
|
||||||
|
|
||||||
while (*str)
|
while (*str)
|
||||||
{
|
{
|
||||||
if (isdigit(*str))
|
if (isdigit((unsigned char) *str))
|
||||||
{
|
{
|
||||||
bytes *= 10;
|
bytes *= 10;
|
||||||
bytes += *str - '0';
|
bytes += *str - '0';
|
||||||
|
|
Loading…
Reference in a new issue