We should avoid #ifdef in C modules. Unused functions are eliminated by the
linker.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
#include <rtc.h>
#include <linux/time.h>
-#if defined(CONFIG_LIB_DATE) || defined(CONFIG_TIMESTAMP)
-
#define FEBRUARY 2
#define STARTOFTIME 1970
#define SECDAY 86400L
return (hours * 60 + tm->tm_min) * 60 + tm->tm_sec;
}
-#endif /* CONFIG_LIB_DATE || CONFIG_TIMESTAMP */
-
-#ifdef CONFIG_LIB_DATE
/* for compatibility with linux code */
time64_t mktime64(const unsigned int year, const unsigned int mon,
const unsigned int day, const unsigned int hour,
return (time64_t)rtc_mktime((const struct rtc_time *)&time);
}
-#endif