raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.26k stars 838 forks source link

error: macro "poll" requires 3 arguments, but only 1 given #1612

Closed romal closed 5 months ago

romal commented 5 months ago

Hi, I try to build https://github.com/racka98/PicoW-MQTT-C.git with FreeRTOS but i got the bellow error on the pico-sdk side, could someone help me on that part, Thanks

[build] [ 52%] Building C object src/CMakeFiles/PICO_MQTT.dir/home/arul/pico/pico-sdk/src/rp2_common/hardware_pll/pll.c.obj [build] [ 52%] Building C object src/CMakeFiles/PICO_MQTT.dir/home/arul/pico/pico-sdk/src/rp2_common/hardware_clocks/clocks.c.obj [build] [ 52%] Building C object src/CMakeFiles/PICO_MQTT.dir/home/arul/pico/pico-sdk/src/rp2_common/hardware_vreg/vreg.c.obj [build] [ 52%] Building ASM object src/CMakeFiles/PICO_MQTT.dir/home/arul/pico/pico-sdk/src/rp2_common/hardware_divider/divider.S.obj [build] In file included from /home/arul/pico/pico-sdk/src/rp2_common/pico_cyw43_arch/include/pico/cyw43_arch.h:18, [build] from /home/arul/picow/PicoW-MQTT-C/src/main.cpp:11: [build] /home/arul/pico/pico-sdk/src/rp2_common/pico_async_context/include/pico/async_context.h:397:57: error: macro "poll" requires 3 arguments, but only 1 given [build] 397 | if (context->type->poll) context->type->poll(context); [build] | ^ [build] In file included from /home/arul/picow/PicoW-MQTT-C/src/TCPTransport.h:17, [build] from /home/arul/picow/PicoW-MQTT-C/src/MQTTAgent.h:7, [build] from /home/arul/picow/PicoW-MQTT-C/src/main.cpp:5: [build] /home/arul/pico/pico-sdk/lib/lwip/src/include/lwip/sockets.h:672: note: macro "poll" defined here [build] 672 | #define poll(fds,nfds,timeout) lwip_poll(fds,nfds,timeout) [build] | [build] [ 53%] Building C object src/CMakeFiles/PICO_MQTT.dir/home/arul/pico/pico-sdk/src/rp2_common/hardware_watchdog/watchdog.c.obj

aallan commented 5 months ago

This sounds like something that can be better supported on our forums rather than here on Github, especially since you're trying to build a third-party project? The first place you should go is their Github not ours?