i2c: fsl_i2c: Migrate to Kconfig
[platform/kernel/u-boot.git] / include / linux / time.h
index bf12b99..702dd27 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _LINUX_TIME_H
 #define _LINUX_TIME_H
 
+#include <rtc.h>
+#include <vsprintf.h>
 #include <linux/types.h>
 
 #define _DEFUN(a,b,c) a(c)
@@ -93,11 +95,6 @@ _DEFUN (localtime_r, (tim_p, res),
        rem += SECSPERDAY;
        --days;
     }
-    while (rem >= SECSPERDAY)
-    {
-       rem -= SECSPERDAY;
-       ++days;
-    }
 
     /* compute hour, min, and sec */
     res->tm_hour = (int) (rem / SECSPERHOUR);
@@ -155,4 +152,13 @@ _DEFUN (ctime_r, (tim_p, result),
     return asctime_r (localtime_r (tim_p, &tm), result);
 }
 
+/* for compatibility with linux code */
+typedef __s64 time64_t;
+
+#ifdef CONFIG_LIB_DATE
+time64_t mktime64(const unsigned int year, const unsigned int mon,
+                 const unsigned int day, const unsigned int hour,
+                 const unsigned int min, const unsigned int sec);
+#endif
+
 #endif