Prepare api and time for ESP-IDF >= 5 (#5332)

This commit is contained in:
Jimmy Hedman
2023-09-04 22:51:04 +02:00
committed by GitHub
parent 3d9af2a67c
commit aabe0091cc
2 changed files with 94 additions and 92 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ void RealTimeClock::synchronize_epoch_(uint32_t epoch) {
struct timeval timev {
.tv_sec = static_cast<time_t>(epoch), .tv_usec = 0,
};
ESP_LOGVV(TAG, "Got epoch %u", epoch);
ESP_LOGVV(TAG, "Got epoch %" PRIu32, epoch);
timezone tz = {0, 0};
int ret = settimeofday(&timev, &tz);
if (ret == EINVAL) {