summaryrefslogtreecommitdiff
path: root/include/linux/time.h
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2019-11-13 09:44:50 +0900
committerTom Rini <trini@konsulko.com>2019-12-06 16:44:19 -0500
commit18723117271370e480f8ca9495f8850522fabb74 (patch)
treed882979cd6cfe470c3aa9c20d1f7eaa38d5cc95f /include/linux/time.h
parent05429b6cf5b3f30f773b8e79fe4cd3688349d7d2 (diff)
downloadu-boot-18723117271370e480f8ca9495f8850522fabb74.tar.gz
u-boot-18723117271370e480f8ca9495f8850522fabb74.tar.bz2
u-boot-18723117271370e480f8ca9495f8850522fabb74.zip
lib: add mktime64() for linux compatibility
This function will be used in lib/crypto/x509_cert_parser.c, which will also be imported from linux code in a later commit. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Diffstat (limited to 'include/linux/time.h')
-rw-r--r--include/linux/time.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/time.h b/include/linux/time.h
index b8d298eb4d..dc9344a6d9 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -1,6 +1,7 @@
#ifndef _LINUX_TIME_H
#define _LINUX_TIME_H
+#include <rtc.h>
#include <linux/types.h>
#define _DEFUN(a,b,c) a(c)
@@ -150,4 +151,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