]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix no-posix-io
authorMatt Caswell <matt@openssl.org>
Tue, 24 Nov 2020 15:22:25 +0000 (15:22 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 26 Nov 2020 16:09:12 +0000 (16:09 +0000)
The "multi" variable should only be used within HTTP_DAEMON guards.
However there were a few spots where this was not the case, which
causes no-posix-io builds to fail.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13498)

apps/lib/http_server.c

index b7d98420130063716dde3ae5600a68fbdb8bbc25..7626ca9aa4762055056ab09ba233275513ca2b79 100644 (file)
 # endif
 #endif
 
-int multi = 0; /* run multiple responder processes */
-
 #ifdef HTTP_DAEMON
+int multi = 0; /* run multiple responder processes */
 int acfd = (int) INVALID_SOCKET;
-#endif
 
-#ifdef HTTP_DAEMON
 static int print_syslog(const char *str, size_t len, void *levPtr)
 {
     int level = *(int *)levPtr;
@@ -61,9 +58,9 @@ void log_message(const char *prog, int level, const char *fmt, ...)
             syslog(level, "%s", buf);
         if (level >= LOG_ERR)
             ERR_print_errors_cb(print_syslog, &level);
-    }
+    } else
 #endif
-    if (!multi) {
+    {
         BIO_printf(bio_err, "%s: ", prog);
         BIO_vprintf(bio_err, fmt, ap);
         BIO_printf(bio_err, "\n");