gmag11 / ESPNtpClient

High accuracy NTP library for ESP32 and ESP8266
MIT License
118 stars 25 forks source link

ESP8266 SDK 3.X Compile failed - Fixed #21

Closed vslinuxdotnet closed 3 years ago

vslinuxdotnet commented 3 years ago

Hello, I fixed some problems with your lib in the new ESP8266 SDK, the 3.X.

In file: ESPNtpClient.h char* getTimeStr (timeval moment) { tm* local_tm = localtime (&moment.tv_usec); to char* getTimeStr (timeval moment) { tm* local_tm = localtime ((time_t*) &moment.tv_usec);

In file: ESPNtpClient.cpp char* dumpNTPPacket (byte* data, size_t length, char* buffer, int len) { to char* dumpNTPPacket (uint8_t* data, size_t length, char* buffer, int len) {

Regards,

VS

gmag11 commented 3 years ago

Fixed on https://github.com/gmag11/ESPNtpClient/commit/12f30aa6ef9e71d300840f4ad0d70b83391c4fee

Thank you!