Prechádzať zdrojové kódy

build: fix undefined symbol compilation errors

The function `abort_process` is only defined if the preprocessor symbol
`USE_TIMERS` is defined.  Additionally, the variable `ssl_mutexes` is
only defined if the preprocessor symbol `OPENSSL_APP_1_1` is not
defined.  This patch updates the source to put calls to these values
inside correct preprocessor include guards.

Signed-off-by: Keith Holman <keith.holman@windriver.com>
Keith Holman 7 rokov pred
rodič
commit
f5ea8852f0
1 zmenil súbory, kde vykonal 4 pridanie a 0 odobranie
  1. 4 0
      src/civetweb.c

+ 4 - 0
src/civetweb.c

@@ -11099,9 +11099,11 @@ done:
 	mg_free(blk.var);
 	mg_free(blk.buf);
 
+#if defined(USE_TIMERS)
 	if (pid != (pid_t)-1) {
 		abort_process((void *)pid);
 	}
+#endif /* USE_TIMERS */
 	if (fdin[0] != -1) {
 		close(fdin[0]);
 	}
@@ -15315,7 +15317,9 @@ initialize_ssl(char *ebuf, size_t ebuf_len)
 	if (!ssllib_dll_handle) {
 		ssllib_dll_handle = load_dll(ebuf, ebuf_len, SSL_LIB, ssl_sw);
 		if (!ssllib_dll_handle) {
+#if !defined(OPENSSL_API_1_1)
 			mg_free(ssl_mutexes);
+#endif
 			DEBUG_TRACE("%s", ebuf);
 			return 0;
 		}