From ebc1258ea63841b7a37055d5cad59deba3fd95a3 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Mon, 15 Dec 2025 10:02:08 +0100 Subject: [PATCH] fix(mosq): Fix mosquitto build on latest master --- ci/ignore_build_warnings.txt | 1 + components/mosquitto/CMakeLists.txt | 2 ++ components/mosquitto/examples/broker/sdkconfig.defaults | 1 + .../mosquitto/examples/serverless_mqtt/sdkconfig.defaults | 1 + 4 files changed, 5 insertions(+) create mode 100644 components/mosquitto/examples/broker/sdkconfig.defaults diff --git a/ci/ignore_build_warnings.txt b/ci/ignore_build_warnings.txt index df4e0ba5c..72e106f13 100644 --- a/ci/ignore_build_warnings.txt +++ b/ci/ignore_build_warnings.txt @@ -6,3 +6,4 @@ Warning: Deprecated: Command 'sign_data' is deprecated. Use 'sign-data' instead. Warning: Deprecated: Command 'extract_public_key' is deprecated. Use 'extract-public-key' instead. warning: unknown kconfig symbol 'EXAMPLE_ETH_PHY_IP101' WARNING: The following Kconfig variables were used in "if" clauses, but not +warning: unknown kconfig symbol 'LIBC_NEWLIB' diff --git a/components/mosquitto/CMakeLists.txt b/components/mosquitto/CMakeLists.txt index 5e71918d4..ee071fd69 100644 --- a/components/mosquitto/CMakeLists.txt +++ b/components/mosquitto/CMakeLists.txt @@ -101,3 +101,5 @@ set(sources_that_define_gnu_source ${m_src_dir}/loop.c ${m_src_dir}/mux_poll.c) foreach(offending_src ${sources_that_define_gnu_source}) set_source_files_properties(${offending_src} PROPERTIES COMPILE_OPTIONS "-U_GNU_SOURCE") endforeach() + +set_source_files_properties(${m_src_dir}/security_default.c PROPERTIES COMPILE_OPTIONS "-Wno-char-subscripts") diff --git a/components/mosquitto/examples/broker/sdkconfig.defaults b/components/mosquitto/examples/broker/sdkconfig.defaults new file mode 100644 index 000000000..c76fd80b4 --- /dev/null +++ b/components/mosquitto/examples/broker/sdkconfig.defaults @@ -0,0 +1 @@ +CONFIG_LIBC_NEWLIB=y diff --git a/components/mosquitto/examples/serverless_mqtt/sdkconfig.defaults b/components/mosquitto/examples/serverless_mqtt/sdkconfig.defaults index f0fd9cde6..d871b0d2a 100644 --- a/components/mosquitto/examples/serverless_mqtt/sdkconfig.defaults +++ b/components/mosquitto/examples/serverless_mqtt/sdkconfig.defaults @@ -4,3 +4,4 @@ CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=32768 CONFIG_LWIP_SNTP_MAX_SERVERS=2 CONFIG_MBEDTLS_SSL_PROTO_DTLS=y CONFIG_MBEDTLS_SSL_DTLS_SRTP=y +CONFIG_LIBC_NEWLIB=y