-
Notifications
You must be signed in to change notification settings - Fork 239
Add missing strdup implementation for Arduino Uno R4-WiFi #308
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
Add missing strdup implementation for Arduino Uno R4-WiFi #308
Conversation
This is great but can you make it work for the Uno R4 Minima too. When I try to compile it, I get the following errors, are there changes to the Header file that need to be included. C:\Users\grant\OneDrive\Documents\Arduino\libraries\MQTT\src\MQTTClient.cpp:176:1: error: prototype for 'MQTTClient::MQTTClient(int, int)' does not match any in class 'MQTTClient' exit status 1 Compilation error: exit status 1 |
Done! I don't have a R4 Uno Minima but i tried compiling some code using arduino-cli and looks like it works. |
Thanks for the quick response, that is great. I also got rid of all the compile errors by copying your code #ifdef ARDUINO_UNOR4_MINIMA inline char *strdup(const char *dup) { #endif directly into the MQTTClient.cpp file |
For sure this is not the most elegant solution, but given that those arduinos are missing those POSIX functions i guess it's okay until they fix it otherwise. |
I'd like to wait for arduino/ArduinoCore-renesas#87, as it will solve problem at the source. |
I'm closing this as it seems that issue has been resolved in the Arduino core. |
Implements missing "strdup" function in case of Arduino Uno R4 WiFi.
Possible solution for #307.