Skip to content

Commit 77abff4

Browse files
authored
Merge pull request #973 from david-cermak/fix/mosq_build
fix(mosq): Fix build with the new picolibc
2 parents 7f8494a + ebc1258 commit 77abff4

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed

ci/ignore_build_warnings.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ Warning: Deprecated: Command 'sign_data' is deprecated. Use 'sign-data' instead.
66
Warning: Deprecated: Command 'extract_public_key' is deprecated. Use 'extract-public-key' instead.
77
warning: unknown kconfig symbol 'EXAMPLE_ETH_PHY_IP101'
88
WARNING: The following Kconfig variables were used in "if" clauses, but not
9+
warning: unknown kconfig symbol 'LIBC_NEWLIB'

components/mosquitto/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,5 @@ set(sources_that_define_gnu_source ${m_src_dir}/loop.c ${m_src_dir}/mux_poll.c)
101101
foreach(offending_src ${sources_that_define_gnu_source})
102102
set_source_files_properties(${offending_src} PROPERTIES COMPILE_OPTIONS "-U_GNU_SOURCE")
103103
endforeach()
104+
105+
set_source_files_properties(${m_src_dir}/security_default.c PROPERTIES COMPILE_OPTIONS "-Wno-char-subscripts")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_LIBC_NEWLIB=y

components/mosquitto/examples/serverless_mqtt/sdkconfig.defaults

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=32768
44
CONFIG_LWIP_SNTP_MAX_SERVERS=2
55
CONFIG_MBEDTLS_SSL_PROTO_DTLS=y
66
CONFIG_MBEDTLS_SSL_DTLS_SRTP=y
7+
CONFIG_LIBC_NEWLIB=y

components/mosquitto/port/priv_include/config.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616

1717
#include <ctype.h>
1818
#include "net/if.h"
19+
#include "esp_idf_version.h"
1920

21+
#if ESP_IDF_VERSION_MAJOR < 6
2022
#undef isspace
2123
#define isspace(__c) (__ctype_lookup((int)__c)&_S)
24+
#endif
2225

2326
#define VERSION "v2.0.20~5"

0 commit comments

Comments
 (0)