summaryrefslogtreecommitdiffstats
path: root/CryptoPkg
diff options
context:
space:
mode:
Diffstat (limited to 'CryptoPkg')
-rw-r--r--CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c8
-rw-r--r--CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c10
-rw-r--r--CryptoPkg/Library/BaseCryptLib/SysCall/UnitTestHostCrtWrapper.c8
-rw-r--r--CryptoPkg/Library/Include/CrtLibSupport.h6
4 files changed, 32 insertions, 0 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c b/CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c
index 2956b92d08..4f23de2830 100644
--- a/CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c
+++ b/CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c
@@ -42,3 +42,11 @@ gmtime (
{
return NULL;
}
+
+unsigned int
+sleep (
+ unsigned int seconds
+ )
+{
+ return 0;
+}
diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c b/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c
index 2dfc6fe6c5..30c93a45ea 100644
--- a/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c
+++ b/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c
@@ -9,6 +9,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Uefi.h>
#include <CrtLibSupport.h>
+#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
//
@@ -195,3 +196,12 @@ gmtime (
return GmTime;
}
+
+unsigned int
+sleep (
+ unsigned int seconds
+ )
+{
+ gBS->Stall (seconds * 1000 * 1000);
+ return 0;
+}
diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/UnitTestHostCrtWrapper.c b/CryptoPkg/Library/BaseCryptLib/SysCall/UnitTestHostCrtWrapper.c
index 244e57437e..1ec7fa37cd 100644
--- a/CryptoPkg/Library/BaseCryptLib/SysCall/UnitTestHostCrtWrapper.c
+++ b/CryptoPkg/Library/BaseCryptLib/SysCall/UnitTestHostCrtWrapper.c
@@ -104,4 +104,12 @@ getegid (
return 0;
}
+unsigned int
+sleep (
+ unsigned int seconds
+ )
+{
+ return 0;
+}
+
int errno = 0;
diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/CrtLibSupport.h
index afc00956ab..a9171fba36 100644
--- a/CryptoPkg/Library/Include/CrtLibSupport.h
+++ b/CryptoPkg/Library/Include/CrtLibSupport.h
@@ -16,6 +16,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/PrintLib.h>
+#include <Library/TimerLib.h>
#define OPENSSLDIR ""
#define ENGINESDIR ""
@@ -334,6 +335,11 @@ gmtime (
const time_t *
);
+unsigned int
+sleep (
+ unsigned int seconds
+ );
+
uid_t
getuid (
void