diff --git a/lang/c/src/schema.c b/lang/c/src/schema.c index cc50cb4c6c6..3d762b594fa 100644 --- a/lang/c/src/schema.c +++ b/lang/c/src/schema.c @@ -32,6 +32,10 @@ #include "st.h" #include "schema.h" +#if defined(_MSC_VER) && _MSC_VER < 1700 && defined(__cplusplus) +#define namespace _Namespace +#endif + #define DEFAULT_TABLE_SIZE 32 /* forward declaration */ diff --git a/lang/c/tests/test_interop_data.c b/lang/c/tests/test_interop_data.c index 9875f471a54..354d5d2c4e1 100644 --- a/lang/c/tests/test_interop_data.c +++ b/lang/c/tests/test_interop_data.c @@ -35,7 +35,7 @@ int should_test(char *d_name) } ptrdiff_t diff = d_name + strlen(d_name) - ext_pos; - char *substr = malloc(sizeof(char) * diff); + char *substr = (char *) malloc(sizeof(char) * diff); strncpy(substr, ext_pos + 1, diff - 1); *(substr + diff - 1) = '\0'; if (strcmp(substr, "avro") != 0) @@ -57,7 +57,7 @@ int should_test(char *d_name) } diff = ext_pos - codec_pos; - substr = malloc(sizeof(char) * diff); + substr = (char *) malloc(sizeof(char) * diff); strncpy(substr, codec_pos + 1, diff - 1); *(substr + diff - 1) = '\0'; if (strcmp(substr, "deflate") == 0 || strcmp(substr, "snappy") == 0) @@ -96,7 +96,7 @@ int main(int argc, char *argv[]) char *d_name = ent->d_name; size_t d_name_len = strlen(d_name); size_t size = strlen(argv[1]) + d_name_len + 2; - char* path = malloc(sizeof(char) * size); + char* path = (char *) malloc(sizeof(char) * size); sprintf(path, "%s/%s", argv[1], d_name); if (!should_test(d_name))