Procházet zdrojové kódy

[update] adapted to winsock on windows' simulator. (#57)

xiangxistu před 3 roky
rodič
revize
7aa8874a00

+ 1 - 1
mbedtls/include/mbedtls/platform_time.h

@@ -49,7 +49,7 @@ extern "C" {
 typedef MBEDTLS_PLATFORM_TIME_TYPE_MACRO mbedtls_time_t;
 #else
 /* For time_t */
-#include <time.h>
+#include <sys/time.h>
 typedef time_t mbedtls_time_t;
 #endif /* MBEDTLS_PLATFORM_TIME_TYPE_MACRO */
 

+ 4 - 0
ports/src/timing_alt.c

@@ -46,6 +46,10 @@
 #include <time.h>
 #endif
 
+#ifdef _WIN32
+#define SIGALRM 14
+#endif
+
 struct _hr_time
 {
     struct timeval start;

+ 6 - 0
ports/src/tls_net.c

@@ -33,6 +33,12 @@
 
 #include <string.h>
 
+#if defined(_WIN32)
+#define SIGPIPE     13
+#endif
+
+#undef _WIN32
+
 #if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(EFIX64) && \
     !defined(EFI32)