TLS nits 2

This commit is contained in:
cpq 2021-01-25 10:08:15 +00:00
parent 9a19485454
commit 66287ad6c1
4 changed files with 11 additions and 0 deletions

View File

@ -3254,15 +3254,18 @@ void mg_timer_poll(unsigned long now_ms) {
#include <mbedtls/debug.h>
#include <mbedtls/ssl.h>
// Different versions have those in different files, so declare here
#ifndef EXTERN_C
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else
#define EXTERN_C
#endif
#endif
EXTERN_C int mbedtls_net_recv(void *, unsigned char *, size_t);
EXTERN_C int mbedtls_net_send(void *, const unsigned char *, size_t);

View File

@ -228,8 +228,11 @@ static inline int ff_vfprintf(FF_FILE *fp, const char *fmt, va_list ap) {
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
typedef unsigned char uint8_t;
typedef char int8_t;
typedef unsigned short uint16_t;
typedef short int16_t;
typedef unsigned int uint32_t;
typedef int int32_t;
typedef int bool;
enum { false = 0, true = 1 };
#else

View File

@ -7,8 +7,11 @@
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
typedef unsigned char uint8_t;
typedef char int8_t;
typedef unsigned short uint16_t;
typedef short int16_t;
typedef unsigned int uint32_t;
typedef int int32_t;
typedef int bool;
enum { false = 0, true = 1 };
#else

View File

@ -9,11 +9,13 @@
#include <mbedtls/ssl.h>
// Different versions have those in different files, so declare here
#ifndef EXTERN_C
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else
#define EXTERN_C
#endif
#endif
EXTERN_C int mbedtls_net_recv(void *, unsigned char *, size_t);
EXTERN_C int mbedtls_net_send(void *, const unsigned char *, size_t);