diff --git a/src/HttpServer.c b/src/HttpServer.c index 908627a..df9afb6 100644 --- a/src/HttpServer.c +++ b/src/HttpServer.c @@ -362,10 +362,12 @@ HttpServerCreate(unsigned short port, unsigned int nThreads, unsigned int maxCon goto error; } +#ifdef SO_REUSEPORT if (setsockopt(server->sd, SOL_SOCKET, SO_REUSEPORT, &ENABLE, sizeof(int)) < 0) { goto error; } +#endif sa.sin_family = AF_INET; sa.sin_port = htons(port); diff --git a/src/Util.c b/src/Util.c index 6bf6b11..d6a0cc3 100644 --- a/src/Util.c +++ b/src/Util.c @@ -135,7 +135,7 @@ UtilStringToBytes(char *str) while (*str) { - if (isdigit(*str)) + if (isdigit((unsigned char) *str)) { bytes *= 10; bytes += *str - '0';