Skip to content

Commit 7e8e438

Browse files
author
Ben Taylor
committed
Replace cases of time_t with mbedtls_time_t
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
1 parent ee1991a commit 7e8e438

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

library/ssl_tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3178,7 +3178,7 @@ static int ssl_tls12_session_load(mbedtls_ssl_session *session,
31783178
start = MBEDTLS_GET_UINT64_BE(p, 0);
31793179
p += 8;
31803180

3181-
session->start = (time_t) start;
3181+
session->start = (mbedtls_time_t) start;
31823182
#endif /* MBEDTLS_HAVE_TIME */
31833183

31843184
/*

programs/ssl/ssl_context_info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ static void print_time(const uint64_t *time)
277277
{
278278
#if defined(MBEDTLS_HAVE_TIME)
279279
char buf[20];
280-
struct tm *t = gmtime((time_t *) time);
280+
struct tm *t = gmtime((mbedtls_time_t *) time);
281281
static const char format[] = "%Y-%m-%d %H:%M:%S";
282282
if (NULL != t) {
283283
strftime(buf, sizeof(buf), format, t);

programs/test/udp_proxy.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#if defined(MBEDTLS_HAVE_TIME)
2626
#include <time.h>
2727
#define mbedtls_time time
28-
#define mbedtls_time_t time_t
2928
#endif
3029
#define mbedtls_printf printf
3130
#define mbedtls_calloc calloc

0 commit comments

Comments
 (0)