diff --git a/src/auth.c b/src/auth.c index 9ded49d..535eacc 100644 --- a/src/auth.c +++ b/src/auth.c @@ -823,7 +823,7 @@ int doauth(struct clientparam * param){ (res = (*authfuncs->authorize)(param))) return res; if(conf.authcachetype && authfuncs->authenticate && authfuncs->authenticate != cacheauth && param->username && (!(conf.authcachetype&4) || (!param->pwtype && param->password))){ - struct authcache ac={}; + struct authcache ac={.username=""}; if(param->username) strncpy((char *)ac.username, (char *)param->username, 64); if(*SAFAMILY(¶m->sincr) == AF_INET diff --git a/src/conf.c b/src/conf.c index e159243..3ba6c9c 100644 --- a/src/conf.c +++ b/src/conf.c @@ -153,6 +153,7 @@ int start_proxy_thread(struct child * chp){ pthread_t thread; #ifdef _WIN32 HANDLE h; + DWORD num; #endif char r[1]; @@ -171,7 +172,7 @@ int start_proxy_thread(struct child * chp){ pthread_attr_destroy(&pa); #endif #ifdef _WIN32 - ReadFile(conf.threadinit[0], r, 1, NULL, NULL); + ReadFile(conf.threadinit[0], r, 1, &num, NULL); #else while(read(conf.threadinit[0], r, 1) !=1) if(errno != EINTR) { fprintf(stderr, "pipe failed\n"); diff --git a/src/plugins/SSLPlugin/ssl_plugin.c b/src/plugins/SSLPlugin/ssl_plugin.c index 4a47166..8d5a4ed 100644 --- a/src/plugins/SSLPlugin/ssl_plugin.c +++ b/src/plugins/SSLPlugin/ssl_plugin.c @@ -279,7 +279,7 @@ SSL_CONN ssl_handshake_to_server(SOCKET s, char * hostname, SSL_CONFIG *config, #endif do { - struct pollfd fds[1] = {{}}; + struct pollfd fds[1] = {{INVALID_SOCKET}}; int sslerr; err = SSL_connect(conn->ssl); @@ -350,7 +350,7 @@ SSL_CONN ssl_handshake_to_client(SOCKET s, SSL_CONFIG *config, X509 *server_cert SSL_set_fd(conn->ssl, s); do { - struct pollfd fds[1] = {{}}; + struct pollfd fds[1] = {{INVALID_SOCKET}}; int sslerr; err = SSL_accept(conn->ssl); diff --git a/src/proxymain.c b/src/proxymain.c index fef8b0c..323dfcf 100644 --- a/src/proxymain.c +++ b/src/proxymain.c @@ -116,11 +116,11 @@ void * threadfunc (void *p) { #undef param int pushthreadinit(){ - return #ifdef _WIN32 - WriteFile(conf.threadinit[1], "1", 1, NULL, NULL); + DWORD n; + return WriteFile(conf.threadinit[1], "1", 1, &n, NULL); #else - write(conf.threadinit[1], "1", 1); + return write(conf.threadinit[1], "1", 1); #endif }