فهرست منبع

Fix some MSVC build errors.

ambrop7 12 سال پیش
والد
کامیت
f59e6e2f69
3فایلهای تغییر یافته به همراه2 افزوده شده و 3 حذف شده
  1. 0 1
      examples/cavl_test.c
  2. 1 1
      misc/concat_strings.h
  3. 1 1
      misc/ipaddr6.h

+ 0 - 1
examples/cavl_test.c

@@ -32,7 +32,6 @@
 #include <time.h>
 #include <stdint.h>
 #include <limits.h>
-#include <inttypes.h>
 
 #include <misc/balloc.h>
 #include <misc/compare.h>

+ 1 - 1
misc/concat_strings.h

@@ -60,7 +60,7 @@ static char * concat_strings (int num, ...)
     va_end(ap);
     
     // allocate memory
-    char *res_str = malloc(sum + 1);
+    char *res_str = (char *)malloc(sum + 1);
     if (!res_str) {
         return NULL;
     }

+ 1 - 1
misc/ipaddr6.h

@@ -35,7 +35,6 @@
 #define BADVPN_MISC_IPADDR6_H
 
 #include <stdio.h>
-#include <inttypes.h>
 #include <string.h>
 #include <stdlib.h>
 #include <limits.h>
@@ -44,6 +43,7 @@
 #include <misc/byteorder.h>
 #include <misc/parse_number.h>
 #include <misc/find_char.h>
+#include <misc/print_macros.h>
 
 struct ipv6_addr {
     uint8_t bytes[16];