mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Abstracts away time()/stdlib.h into platform
Substitutes time() into a configurable platform interface to allow it to be easily substituted.
This commit is contained in:
@ -32,6 +32,13 @@
|
||||
#error "This module only works on Unix and Windows, see MBEDTLS_NET_C in config.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "mbedtls/platform.h"
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#define mbedtls_time_t time_t
|
||||
#endif
|
||||
|
||||
#include "mbedtls/net.h"
|
||||
|
||||
#include <string.h>
|
||||
@ -86,7 +93,6 @@ static int wsa_init_done = 0;
|
||||
#define MSVC_INT_CAST
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <time.h>
|
||||
|
Reference in New Issue
Block a user