From 7776d3e0652090ad491cf23698560b7787c8b781 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 16 Jan 2017 19:53:10 +0800 Subject: [PATCH] time: only define {get,set}_boot_time if FRC1 or RTC is used as time source Fixes https://github.com/espressif/esp-idf/issues/238 --- components/newlib/time.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/newlib/time.c b/components/newlib/time.c index 004b7398c2..30c7ca7f40 100644 --- a/components/newlib/time.c +++ b/components/newlib/time.c @@ -94,6 +94,7 @@ static void IRAM_ATTR frc_timer_isr() #endif // WITH_FRC1 +#if defined(WITH_RTC) || defined(WITH_FRC1) static void set_boot_time(uint64_t time_us) { _lock_acquire(&s_boot_time_lock); @@ -118,6 +119,7 @@ static uint64_t get_boot_time() _lock_release(&s_boot_time_lock); return result; } +#endif //defined(WITH_RTC) || defined(WITH_FRC1) void esp_setup_time_syscalls() {