소스 검색

trying to fix the OPENSSL_API_COMPAT undef error

kakwa 8 년 전
부모
커밋
53395d9b88
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -12312,7 +12312,7 @@ set_ssl_option(struct mg_context *ctx)
 	SSL_CTX_set_options(ctx->ssl_ctx, ssl_get_protocol(protocol_ver));
 	SSL_CTX_set_options(ctx->ssl_ctx, ssl_get_protocol(protocol_ver));
 	SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_SINGLE_DH_USE);
 	SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_SINGLE_DH_USE);
 	SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_CIPHER_SERVER_PREFERENCE);
 	SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_CIPHER_SERVER_PREFERENCE);
-#if OPENSSL_VERSION_NUMBER < 0x1000114fL
+#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1000114fL
 	SSL_CTX_set_ecdh_auto(ctx->ssl_ctx, 1);
 	SSL_CTX_set_ecdh_auto(ctx->ssl_ctx, 1);
 #endif
 #endif