Skip to content

Commit

Permalink
Fix compilation with ESP8266 3.x.x SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
gmag11 committed Jul 25, 2021
1 parent 176c166 commit 12f30aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ESPNtpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ int16_t flipInt16 (int16_t number) {
return *result;
}

char* dumpNTPPacket (byte* data, size_t length, char* buffer, int len) {
char* dumpNTPPacket (char* data, size_t length, char* buffer, int len) {
int remaining = len - 1;
int index = 0;
int written;
Expand Down
2 changes: 1 addition & 1 deletion src/ESPNtpClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ class NTPClient {
* @return String built from given time
*/
char* getTimeStr (timeval moment) {
tm* local_tm = localtime (&moment.tv_usec);
tm* local_tm = localtime ((time_t*)&moment.tv_usec);
size_t index = strftime (strBuffer, sizeof (strBuffer), "%H:%M:%S", local_tm);
snprintf (strBuffer + index, sizeof (strBuffer) - index, ".%06ld", moment.tv_usec);
return strBuffer;
Expand Down

0 comments on commit 12f30aa

Please sign in to comment.