Skip to content

strptime build error within new Arduino Core framework v3.0.0 #248

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

Closed
Lukas-Heiligenbrunner opened this issue Jun 17, 2021 · 2 comments
Closed

Comments

@Lukas-Heiligenbrunner
Copy link
Contributor

A build error occurs with the newest Arduino core version v3.0.0 :

lib/framework/NTPSettingsService.cpp: In member function 'void NTPSettingsService::configureTime(AsyncWebServerRequest*, ArduinoJson::JsonVariant&)':
lib/framework/NTPSettingsService.cpp:78:15: error: 'strptime' was not declared in this scope; did you mean 'strftime'?
   78 |     char* s = strptime(timeLocal.c_str(), "%Y-%m-%dT%H:%M:%S", &tm);
      |               ^~~~~~~~
      |               strftime

This seems to be caused by a disabled prototype.
To fix this you could define your prototype by your own somewhere:

extern "C" char *strptime (const char *__restrict, const char *__restrict, struct tm *__restrict);

--> see esp8266/Arduino#8122

Kind regards.

@rjwats
Copy link
Owner

rjwats commented Jun 19, 2021 via email

@Lukas-Heiligenbrunner
Copy link
Contributor Author

This is fixed in esp8266/Arduino#8147 and should be included in the next Arduino Core release.
I doubt if the prototype patch is really necessary.

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

No branches or pull requests

2 participants