Fix a few things to make Telodendria compile and run on Cygwin.

This commit is contained in:
Jordan Bancino 2022-11-02 15:20:37 +00:00
parent 6992f36c86
commit 92cc2206a1
2 changed files with 3 additions and 1 deletions

View file

@ -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);

View file

@ -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';