raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.24k stars 837 forks source link

pico_lwip_custom_lock_tcpip_core does not link when called from C++ #1737

Closed jaguilar closed 1 week ago

jaguilar commented 1 week ago

If you try to call LOCK_TCPIP_CORE in pico_lwip/include/arch/cc.h, it won't link if you're calling it in C++ code. This is because the functions pico_lwip_custom_lock_tcpip_core and pico_lwip_custom_unlock_tcpip_core are not surrounded by the extern "C" directive and thus get declared with the wrong linkage.

kilograham commented 1 week ago

merged into develop