Skip to content

Commit

Permalink
H7 mbedtls build fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
cpq committed Jul 25, 2023
1 parent 5e50b71 commit 7548af8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/stm32/nucleo-h743zi-make-baremetal-builtin/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,13 @@ int mkdir(const char *path, mode_t mode) {
}

void _init(void) {}

extern uint64_t mg_now(void);

int _gettimeofday(struct timeval *tv, void *tz) {
uint64_t now = mg_now();
(void) tz;
tv->tv_sec = (time_t) (now / 1000);
tv->tv_usec = (unsigned long) ((now % 1000) * 1000);
return 0;
}
1 change: 1 addition & 0 deletions mongoose.c
Original file line number Diff line number Diff line change
Expand Up @@ -5774,6 +5774,7 @@ void mg_tls_ctx_free(struct mg_mgr *mgr) {
mbedtls_x509_crt_free(&ctx->client_cert);
mbedtls_pk_free(&ctx->client_key);
mbedtls_x509_crt_free(&ctx->client_ca);
mbedtls_x509_crt_free(&ctx->server_ca);
#ifdef MBEDTLS_SSL_SESSION_TICKETS
mbedtls_ssl_ticket_free(&ctx->ticket_ctx);
#endif
Expand Down
1 change: 1 addition & 0 deletions src/tls_mbed.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ void mg_tls_ctx_free(struct mg_mgr *mgr) {
mbedtls_x509_crt_free(&ctx->client_cert);
mbedtls_pk_free(&ctx->client_key);
mbedtls_x509_crt_free(&ctx->client_ca);
mbedtls_x509_crt_free(&ctx->server_ca);
#ifdef MBEDTLS_SSL_SESSION_TICKETS
mbedtls_ssl_ticket_free(&ctx->ticket_ctx);
#endif
Expand Down

0 comments on commit 7548af8

Please sign in to comment.