| From adcc5a1ccb9f6ffe9fca793ea67e6c3e7ad8274a Mon Sep 17 00:00:00 2001 |
| From: Seo Suchan <tjtncks@gmail.com> |
| Date: Tue, 7 May 2024 12:46:08 +0900 |
| Subject: [PATCH 2/2] mbedtls: make it no longer depend on mbedtls_version_c |
| complie flag |
| |
| everything that code does is already done as macro constants |
| and openwrt doesn't build with mbedtls with that flag by default |
| |
| Signed-off-by: Seo Suchan <tjtncks@gmail.com> |
| --- |
| lib/core/context.c | 13 ++++++++---- |
| 1 file changed, 8 insertions(+), 4 deletions(-) |
| |
| --- a/lib/core/context.c |
| +++ b/lib/core/context.c |
| @@ -788,11 +788,15 @@ lws_create_context(const struct lws_cont |
| #endif /* network */ |
| |
| #if defined(LWS_WITH_MBEDTLS) |
| - mbedtls_version_get_string(mbedtls_version); |
| -#endif |
| + { |
| |
| -#if defined(LWS_WITH_MBEDTLS) |
| - lwsl_cx_notice(context, "LWS: %s, MbedTLS-%s %s%s", library_version, mbedtls_version, opts_str, s); |
| +#if defined(MBEDTLS_VERSION_C) |
| + mbedtls_version_get_string(mbedtls_version); |
| +#else |
| + lws_snprintf(mbedtls_version, sizeof(mbedtls_version), "%s", MBEDTLS_VERSION_STRING); |
| +#endif |
| + lwsl_cx_notice(context, "LWS: %s, MbedTLS-%s %s%s", library_version, mbedtls_version, opts_str, s); |
| + } |
| #else |
| lwsl_cx_notice(context, "LWS: %s, %s%s", library_version, opts_str, s); |
| #endif |