espressif/esp-protocols

Asio conflict with Arduino-esp32, because the Macro IPADDR_NONE (IDFGH-13808)

AI-Tipto opened this issue · 1 comments

IDF: esp-idf v5.3.1
dependencies:
espressif/arduino-esp32: "^3.1.0-rc1"
espressif/asio: "^1.28.2"

Answers checklist.

  • I have read the documentation for esp-protocols components and the issue is not addressed there.
  • I have updated my esp-protocols branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

D:/espressif/esp/v5.3.1/esp-idf/components/lwip/lwip/src/include/lwip/ip4_addr.h:63:37: error: expected
')' before numeric constant
63 | #define IPADDR_NONE ((u32_t)0xffffffffUL)
| ~ ^~~~~~~~~~~~
D:/espressif/esp/v5.3.1/esp-idf/components/lwip/lwip/src/include/lwip/inet.h:71:29: note: in expansion of macro 'IPADDR_NONE'
71 | #define INADDR_NONE IPADDR_NONE
| ^~~~~~~~~~~
D:/app/asio_test/components/arduino-esp32/cores/esp32/IPAddress.h:137:24: note: in expansion of macro 'INADDR_NONE'
137 | extern const IPAddress INADDR_NONE;

add
#ifdef INADDR_NONE #undef INADDR_NONE #endif

after #include "asio.hpp" before use Arduino library , can compile.