mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 04:55:44 +01:00
Remove the dependency on MBEDTLS_HAVE_TIME from MBEDTLS_TIMING_C
The timing module might include time.h on its own when on a suitable platform, even if MBEDTLS_HAVE_TIME is disabled. Co-authored-by: Tom Cosgrove <tom.cosgrove@arm.com> Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
parent
2603fec329
commit
263d8f7e61
@ -128,7 +128,12 @@
|
|||||||
* MBEDTLS_PLATFORM_TIME_MACRO, MBEDTLS_PLATFORM_TIME_TYPE_MACRO and
|
* MBEDTLS_PLATFORM_TIME_MACRO, MBEDTLS_PLATFORM_TIME_TYPE_MACRO and
|
||||||
* MBEDTLS_PLATFORM_STD_TIME.
|
* MBEDTLS_PLATFORM_STD_TIME.
|
||||||
*
|
*
|
||||||
* Comment if your system does not support time functions
|
* Comment if your system does not support time functions.
|
||||||
|
*
|
||||||
|
* \note If MBEDTLS_TIMING_C is set - to enable the semi-portable timing
|
||||||
|
* interface - timing.c will include time.h on suitable platforms
|
||||||
|
* regardless of the setting of MBEDTLS_HAVE_TIME, unless
|
||||||
|
* MBEDTLS_TIMING_ALT is used. See timing.c for more information.
|
||||||
*/
|
*/
|
||||||
#define MBEDTLS_HAVE_TIME
|
#define MBEDTLS_HAVE_TIME
|
||||||
|
|
||||||
@ -3466,6 +3471,10 @@
|
|||||||
* your own implementation of the whole module by setting
|
* your own implementation of the whole module by setting
|
||||||
* \c MBEDTLS_TIMING_ALT in the current file.
|
* \c MBEDTLS_TIMING_ALT in the current file.
|
||||||
*
|
*
|
||||||
|
* \note The timing module will include time.h on suitable platforms
|
||||||
|
* regardless of the setting of MBEDTLS_HAVE_TIME, unless
|
||||||
|
* MBEDTLS_TIMING_ALT is used. See timing.c for more information.
|
||||||
|
*
|
||||||
* \note See also our Knowledge Base article about porting to a new
|
* \note See also our Knowledge Base article about porting to a new
|
||||||
* environment:
|
* environment:
|
||||||
* https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
|
* https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
|
||||||
|
@ -57,14 +57,14 @@ struct _hr_time
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#if defined(MBEDTLS_HAVE_TIME)
|
/* time.h should be included independently of MBEDTLS_HAVE_TIME. If the
|
||||||
|
* platform matches the ifdefs above, it will be used. */
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
struct _hr_time
|
struct _hr_time
|
||||||
{
|
{
|
||||||
struct timeval start;
|
struct timeval start;
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
#endif /* _WIN32 && !EFIX64 && !EFI32 */
|
#endif /* _WIN32 && !EFIX64 && !EFI32 */
|
||||||
|
|
||||||
#if !defined(HAVE_HARDCLOCK) && defined(MBEDTLS_HAVE_ASM) && \
|
#if !defined(HAVE_HARDCLOCK) && defined(MBEDTLS_HAVE_ASM) && \
|
||||||
|
@ -1,23 +1,17 @@
|
|||||||
Timing: hardclock
|
Timing: hardclock
|
||||||
depends_on:MBEDTLS_HAVE_TIME
|
|
||||||
timing_hardclock:
|
timing_hardclock:
|
||||||
|
|
||||||
Timing: get timer
|
Timing: get timer
|
||||||
depends_on:MBEDTLS_HAVE_TIME
|
|
||||||
timing_get_timer:
|
timing_get_timer:
|
||||||
|
|
||||||
Timing: set alarm with no delay
|
Timing: set alarm with no delay
|
||||||
depends_on:MBEDTLS_HAVE_TIME
|
|
||||||
timing_set_alarm:0:
|
timing_set_alarm:0:
|
||||||
|
|
||||||
Timing: set alarm with 1s delay
|
Timing: set alarm with 1s delay
|
||||||
depends_on:MBEDTLS_HAVE_TIME
|
|
||||||
timing_set_alarm:1:
|
timing_set_alarm:1:
|
||||||
|
|
||||||
Timing: delay 0ms
|
Timing: delay 0ms
|
||||||
depends_on:MBEDTLS_HAVE_TIME
|
|
||||||
timing_delay:0:
|
timing_delay:0:
|
||||||
|
|
||||||
Timing: delay 100ms
|
Timing: delay 100ms
|
||||||
depends_on:MBEDTLS_HAVE_TIME
|
|
||||||
timing_delay:100:
|
timing_delay:100:
|
||||||
|
Loading…
Reference in New Issue
Block a user