Skip to content

Commit cb48bfd

Browse files
committed
Fix errors in builds without MBEDTLS_HAVE_TIME
Signed-off-by: Bence Szépkúti <[email protected]>
1 parent 5bde343 commit cb48bfd

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

tests/suites/test_suite_debug.data

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ printf "%" MBEDTLS_PRINTF_LONGLONG, 0
66
printf_int_expr:(uintptr_t) "%" MBEDTLS_PRINTF_LONGLONG:sizeof(long long):0:"0"
77

88
printf "%" MBEDTLS_PRINTF_MS_TIME, 0
9-
printf_int_expr:(uintptr_t) "%" MBEDTLS_PRINTF_MS_TIME:sizeof(mbedtls_ms_time_t):0:"0"
9+
printf_int_expr:(uintptr_t) "%" MBEDTLS_PRINTF_MS_TIME:MBEDTLS_MS_TIME_SIZE:0:"0"
1010

1111
Debug print msg (threshold 1, level 0)
1212
debug_print_msg_threshold:1:0:"MyFile":999:"MyFile(0999)\: Text message, 2 == 2\n"

tests/suites/test_suite_debug.function

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ static void noop_invalid_parameter_handler(
2323
}
2424
#endif
2525

26+
#ifdef MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO
27+
# define MBEDTLS_MS_TIME_SIZE sizeof(MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO)
28+
#else
29+
# define MBEDTLS_MS_TIME_SIZE sizeof(int64_t)
30+
#endif
31+
2632
struct buffer_data {
2733
char buf[2000];
2834
char *ptr;

0 commit comments

Comments
 (0)