CrtLibSupport: add mktime()

Will be needed by openssl-3.2.x

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2024-06-11 12:02:11 +02:00 committed by mergify[bot]
parent af73d37741
commit 0ec54d8d0c
3 changed files with 31 additions and 0 deletions

View File

@ -43,6 +43,14 @@ gmtime (
return NULL;
}
time_t
mktime (
struct tm *t
)
{
return 0;
}
unsigned int
sleep (
unsigned int seconds

View File

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

View File

@ -348,6 +348,11 @@ gettimeofday (
struct timezone *tz
);
time_t
mktime (
struct tm *t
);
uid_t
getuid (
void