From: Richard Levitte Date: Thu, 26 Apr 2018 19:11:26 +0000 (+0200) Subject: apps/s_server.c: Avoid unused variable due to 'no-dtls' X-Git-Tag: OpenSSL_1_1_1-pre6~8 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ff25dd1a47525c88500dd61cdeb27faaea6ee599;p=oweals%2Fopenssl.git apps/s_server.c: Avoid unused variable due to 'no-dtls' Fixes #6098 Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/6104) --- diff --git a/apps/s_server.c b/apps/s_server.c index be1564a6f6..ef39a4f538 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2189,9 +2189,7 @@ static int sv_body(int s, int stype, int prot, unsigned char *context) SSL *con = NULL; BIO *sbio; struct timeval timeout; -#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) - struct timeval tv; -#else +#if !(defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)) struct timeval *timeoutp; #endif #ifndef OPENSSL_NO_DTLS @@ -2392,9 +2390,9 @@ static int sv_body(int s, int stype, int prot, unsigned char *context) * second and check for any keypress. In a proper Windows * application we wouldn't do this because it is inefficient. */ - tv.tv_sec = 1; - tv.tv_usec = 0; - i = select(width, (void *)&readfds, NULL, NULL, &tv); + timeout.tv_sec = 1; + timeout.tv_usec = 0; + i = select(width, (void *)&readfds, NULL, NULL, &timeout); if (has_stdin_waiting()) read_from_terminal = 1; if ((i < 0) || (!i && !read_from_terminal))