diff options
-rw-r--r-- | CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c | 8 | ||||
-rw-r--r-- | CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c | 18 | ||||
-rw-r--r-- | CryptoPkg/Library/Include/CrtLibSupport.h | 5 |
3 files changed, 31 insertions, 0 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c b/CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c index b625246bda..224e3c3642 100644 --- a/CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c +++ b/CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c @@ -43,6 +43,14 @@ gmtime ( return NULL;
}
+time_t
+mktime (
+ struct tm *t
+ )
+{
+ return 0;
+}
+
unsigned int
sleep (
unsigned int seconds
diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c b/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c index 2e83041cf8..21b79acccd 100644 --- a/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c +++ b/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c @@ -141,6 +141,24 @@ time ( return CalTime;
}
+time_t
+mktime (
+ struct tm *t
+ )
+{
+ EFI_TIME Time = {
+ .Year = (UINT16)t->tm_year,
+ .Month = (UINT8)t->tm_mon,
+ .Day = (UINT8)t->tm_mday,
+ .Hour = (UINT8)t->tm_hour,
+ .Minute = (UINT8)t->tm_min,
+ .Second = (UINT8)t->tm_sec,
+ .TimeZone = EFI_UNSPECIFIED_TIMEZONE,
+ };
+
+ return CalculateTimeT (&Time);
+}
+
//
// Convert a time value from type time_t to struct tm.
//
diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/CrtLibSupport.h index f81f490734..e3e8781d16 100644 --- a/CryptoPkg/Library/Include/CrtLibSupport.h +++ b/CryptoPkg/Library/Include/CrtLibSupport.h @@ -348,6 +348,11 @@ gettimeofday ( struct timezone *tz
);
+time_t
+mktime (
+ struct tm *t
+ );
+
uid_t
getuid (
void
|