diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c index 18b50099..7d34568f 100644 --- a/lib/libwebsockets.c +++ b/lib/libwebsockets.c @@ -2104,6 +2104,8 @@ libwebsocket_create_context(struct lws_context_creation_info *info) goto bail; } +#if defined(WIN32) || defined(_WIN32) +#else signal(SIGUSR2, lws_sigusr2); { sigset_t mask; @@ -2112,6 +2114,7 @@ libwebsocket_create_context(struct lws_context_creation_info *info) sigprocmask(SIG_BLOCK, &mask, NULL); } +#endif #ifdef SSL_OP_NO_COMPRESSION SSL_CTX_set_options(context->ssl_ctx, SSL_OP_NO_COMPRESSION); diff --git a/test-server/test-echo.c b/test-server/test-echo.c index 5692182b..2402f198 100644 --- a/test-server/test-echo.c +++ b/test-server/test-echo.c @@ -250,17 +250,20 @@ int main(int argc, char **argv) } } -#ifndef LWS_NO_DAEMONIZE +#ifndef LWS_NO_DAEMONIZE /* * normally lock path would be /var/lock/lwsts or similar, to * simplify getting started without having to take care about * permissions or running as root, set to /tmp/.lwsts-lock */ +#if defined(WIN32) || defined(_WIN32) +#else if (!client && daemonize && lws_daemonize("/tmp/.lwstecho-lock")) { fprintf(stderr, "Failed to daemonize\n"); return 1; } #endif +#endif #ifdef WIN32 #else