mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
CrtLibSupport: fix gettimeofday()
Turn gettimeofday() into a proper function with return value. Will be needed by openssl-3.2.x Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
609c7e8679
commit
ebf7daa583
@ -50,3 +50,14 @@ sleep (
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
gettimeofday (
|
||||
struct timeval *tv,
|
||||
struct timezone *tz
|
||||
)
|
||||
{
|
||||
tv->tv_sec = 0;
|
||||
tv->tv_usec = 0;
|
||||
return 0;
|
||||
}
|
||||
|
@ -205,3 +205,14 @@ sleep (
|
||||
gBS->Stall (seconds * 1000 * 1000);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
gettimeofday (
|
||||
struct timeval *tv,
|
||||
struct timezone *tz
|
||||
)
|
||||
{
|
||||
tv->tv_sec = (long)time (NULL);
|
||||
tv->tv_usec = 0;
|
||||
return 0;
|
||||
}
|
||||
|
@ -112,4 +112,15 @@ sleep (
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
gettimeofday (
|
||||
struct timeval *tv,
|
||||
struct timezone *tz
|
||||
)
|
||||
{
|
||||
tv->tv_sec = 0;
|
||||
tv->tv_usec = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int errno = 0;
|
||||
|
@ -147,6 +147,8 @@ struct timeval {
|
||||
long tv_usec; /* time value, in microseconds */
|
||||
};
|
||||
|
||||
struct timezone;
|
||||
|
||||
struct sockaddr {
|
||||
__uint8_t sa_len; /* total length */
|
||||
sa_family_t sa_family; /* address family */
|
||||
@ -340,6 +342,12 @@ sleep (
|
||||
unsigned int seconds
|
||||
);
|
||||
|
||||
int
|
||||
gettimeofday (
|
||||
struct timeval *tv,
|
||||
struct timezone *tz
|
||||
);
|
||||
|
||||
uid_t
|
||||
getuid (
|
||||
void
|
||||
@ -439,6 +447,5 @@ strcat (
|
||||
#define assert(expression)
|
||||
#define offsetof(type, member) OFFSET_OF(type,member)
|
||||
#define atoi(nptr) AsciiStrDecimalToUintn(nptr)
|
||||
#define gettimeofday(tvp, tz) do { (tvp)->tv_sec = time(NULL); (tvp)->tv_usec = 0; } while (0)
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user