From 7ea318246c0bd68f959ff74d4e0fab71fdbfbd83 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 19 Feb 2026 12:30:00 +0100 Subject: [PATCH] Fix build error when MBEDTLS_TIMING_C and MBEDTLS_HAVE_TIME are both disabled Signed-off-by: Gilles Peskine --- include/mbedtls/timing.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/mbedtls/timing.h b/include/mbedtls/timing.h index 6b7848c268..01364dd0ba 100644 --- a/include/mbedtls/timing.h +++ b/include/mbedtls/timing.h @@ -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 }; /**