From 26fd407a1e7160593fe25a47d75c5b13a73a2d73 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 26 Nov 2026 18:56:17 +0100 Subject: [PATCH] Supplies stdlib declarations to NetX Duo add-ons --- port/netxduo/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/port/netxduo/CMakeLists.txt b/port/netxduo/CMakeLists.txt index ea5297c..fe65cf0 100644 --- a/port/netxduo/CMakeLists.txt +++ b/port/netxduo/CMakeLists.txt @@ -10,3 +10,12 @@ target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_LIST_DIR}/inc ) + +# These upstream clients use strtoul() or abs() without including stdlib.h. +set_property(SOURCE + ${CMAKE_CURRENT_LIST_DIR}/../../third-party/netxduo/addons/pop3/nxd_pop3_client.c + ${CMAKE_CURRENT_LIST_DIR}/../../third-party/netxduo/addons/smtp/nxd_smtp_client.c + ${CMAKE_CURRENT_LIST_DIR}/../../third-party/netxduo/addons/sntp/nxd_sntp_client.c + TARGET_DIRECTORY ${PROJECT_NAME} + APPEND PROPERTY COMPILE_OPTIONS -include stdlib.h +)