Merge pull request #17115 from Faless/lws_bsd_malloc

Fix mbedTLS and Websocket on FreeBSD
This commit is contained in:
Rémi Verschelde 2018-02-28 21:13:58 +01:00 committed by GitHub
commit c6dff58f49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -85,7 +85,7 @@ if env['builtin_mbedtls']:
thirdparty_dir = "#thirdparty/mbedtls/library/" thirdparty_dir = "#thirdparty/mbedtls/library/"
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
env_mbed_tls.add_source_files(env.modules_sources, thirdparty_sources) env_mbed_tls.add_source_files(env.modules_sources, thirdparty_sources)
env_mbed_tls.Append(CPPPATH=["#thirdparty/mbedtls/include/"]) env_mbed_tls.Prepend(CPPPATH=["#thirdparty/mbedtls/include/"])
# Module sources # Module sources
env_mbed_tls.add_source_files(env.modules_sources, "*.cpp") env_mbed_tls.add_source_files(env.modules_sources, "*.cpp")

View File

@ -69,11 +69,11 @@ else:
env_lws.Append(CPPPATH=[thirdparty_dir]) env_lws.Append(CPPPATH=[thirdparty_dir])
wrapper_includes = ["#thirdparty/lws/mbedtls_wrapper/include/" + inc for inc in ["internal", "openssl", "platform", ""]] wrapper_includes = ["#thirdparty/lws/mbedtls_wrapper/include/" + inc for inc in ["internal", "openssl", "platform", ""]]
env_lws.Append(CPPPATH=wrapper_includes) env_lws.Prepend(CPPPATH=wrapper_includes)
if env['builtin_mbedtls']: if env['builtin_mbedtls']:
mbedtls_includes = "#thirdparty/mbedtls/include" mbedtls_includes = "#thirdparty/mbedtls/include"
env_lws.Append(CPPPATH=[mbedtls_includes]) env_lws.Prepend(CPPPATH=[mbedtls_includes])
if env_lws["platform"] == "windows" or env_lws["platform"] == "uwp": if env_lws["platform"] == "windows" or env_lws["platform"] == "uwp":
env_lws.Append(CPPPATH=[thirdparty_dir + helper_dir]) env_lws.Append(CPPPATH=[thirdparty_dir + helper_dir])

View File

@ -235,7 +235,7 @@ File extracted from upstream source:
- From `server/` exclude `access-log.c`, `cgi.c`, `daemonize.c`, `lws-spa.c`, - From `server/` exclude `access-log.c`, `cgi.c`, `daemonize.c`, `lws-spa.c`,
`peer-limits.c`, `rewrite.c` `peer-limits.c`, `rewrite.c`
- Also copy `win32helpers/` from `win32port/` - Also copy `win32helpers/` from `win32port/`
- `mbedtls_wrapper/include/platform/ssl_port.h` has a small change to check for OSX (missing `malloc.h`). - `mbedtls_wrapper/include/platform/ssl_port.h` has a small change to check for OSX and FreeBSD (missing `malloc.h`).
The bug is fixed in upstream master via `LWS_HAVE_MALLOC_H`, but not in the 2.4.1 branch (as the file structure has changed). The bug is fixed in upstream master via `LWS_HAVE_MALLOC_H`, but not in the 2.4.1 branch (as the file structure has changed).
Important: `lws_config.h` and `lws_config_private.h` contains custom Important: `lws_config.h` and `lws_config_private.h` contains custom

View File

@ -25,7 +25,7 @@
*/ */
#include "string.h" #include "string.h"
#ifdef __APPLE__ #if defined(__APPLE__) || defined(__FreeBSD__)
#include <stdlib.h> #include <stdlib.h>
#else #else
#include "malloc.h" #include "malloc.h"