Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AsyncWebSocket.cpp #1142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

har-in-air
Copy link

Fix compile error for ESP32-C3 RISC-V toolchain ( ambiguous type)

Original compile error :

xxx/ESPAsyncWebServer/src/AsyncWebSocket.cpp:832:28: error: call of overloaded 'IPAddress(unsigned int)' is ambiguous
return IPAddress(0U);
^

xxx/.arduino15/packages/esp32/hardware/esp32/2.0.1/cores/esp32/IPAddress.h:51:5: note: candidate: 'IPAddress::IPAddress(const uint8_t*)'
IPAddress(const uint8_t *address);
^~~~~~~~~
xxx/.arduino15/packages/esp32/hardware/esp32/2.0.1/cores/esp32/IPAddress.h:50:5: note: candidate: 'IPAddress::IPAddress(uint32_t)'
IPAddress(uint32_t address);

Fix compile error for ESP32-C3 toolchain ( ambiguous type)
@aaroneiche
Copy link

I wanted to push this as well. I was unable to get the most recent release to work with my ESP32-C3 project, and this branch compiled without issue.

@quiret
Copy link

quiret commented Feb 2, 2023

Thanks. The Marlin Firmware greatly appreciates your compatibility work. (MarlinFirmware/Marlin#25327)

quiret added a commit to quiret/Marlin that referenced this pull request Feb 2, 2023
…32 to fix compilation issues on the latest Espressif toolchains

When the PR luc-github/ESP3DLib#51 has been merged then please change it back!

- (temporarily) updated the "ESP Async WebServer" dependency for MKS TinyBee / ESP32 to fix compilation issues on the latest Espressif toolchains

Please watch PR me-no-dev/ESPAsyncWebServer#1142 and change back once merged.

- fixed another ESP32 bug due to toolchain update
@FedericoBusero
Copy link

Please rename the subject of this issue to "Fix compilation error on RISC-V processor ESP32-C3"

@bluet
Copy link

bluet commented Feb 12, 2023

related #970

@@ -829,7 +829,7 @@ void AsyncWebSocketClient::binary(AsyncWebSocketMessageBuffer * buffer)

IPAddress AsyncWebSocketClient::remoteIP() {
if(!_client) {
return IPAddress(0U);
return IPAddress((uint32_t)0);
Copy link

@willsmart willsmart Jun 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be great to get this merged some day. There seems to be a whole history of people forking the lib to fix this one line!
I'm using current libs and modern platformio with a ESP32 chip and this error is a hard blocker for using this library (from original source) at all.

The overload with no arguments defaults to a zero address, so I'd suggest leaving the address out altogether...

Suggested change
return IPAddress((uint32_t)0);
return IPAddress();

Both work though, so 🤷

nthd added a commit to nthd/ESPAsyncWebServer that referenced this pull request Oct 16, 2023
arnib13 pushed a commit to Fab-Lab-Akureyri/Lampi that referenced this pull request Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants