Fix build error when MBEDTLS_TIMING_C and MBEDTLS_HAVE_TIME are both disabled

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2026-02-19 12:30:00 +01:00
parent 137b5b776d
commit 7ea318246c

View File

@@ -29,7 +29,14 @@ extern "C" {
* \brief timer structure
*/
struct mbedtls_timing_hr_time {
mbedtls_ms_time_t MBEDTLS_PRIVATE(ms);
#if defined(MBEDTLS_HAVE_TIME)
mbedtls_ms_time_t ms;
#else
/* Without MBEDTLS_HAVE_TIME, we expose the type definitions and
* function declarations, but they can't be implemented. We do
* need to write something here. */
unsigned MBEDTLS_PRIVATE(unused);
#endif
};
/**