1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

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>
This commit is contained in:
AKASHI Takahiro
2019-11-13 09:44:50 +09:00
committed by Tom Rini
parent 05429b6cf5
commit 1872311727
2 changed files with 30 additions and 0 deletions

View File

@@ -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