Sfoglia il codice sorgente

Merge pull request #53 from xiangxistu/master

[fix] when use the branch of RT-Thead that version more than v4.0.3, the "mbedtls" can't compile successful.
guo 4 anni fa
parent
commit
4058840822
2 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 5 0
      ports/src/timing_alt.c
  2. 8 0
      ports/src/tls_net.c

+ 5 - 0
ports/src/timing_alt.c

@@ -38,8 +38,13 @@
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/time.h>
+#if RT_VER_NUM >= 0x40004
+#include <sys/errno.h>
+#include <sys/signal.h>
+#else
 #include <signal.h>
 #include <time.h>
+#endif
 
 struct _hr_time
 {

+ 8 - 0
ports/src/tls_net.c

@@ -61,6 +61,14 @@ static int wsa_init_done = 0;
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/select.h>
+#if RT_VER_NUM >= 0x40004
+#include <sys/ioctl.h>
+#include <sys/errno.h>
+#include <fcntl.h>
+#else
+#include <dfs_select.h>
+#include <sys/ioctl.h>
+#endif
 #include <netdb.h>
 
 #include <rtthread.h>