 include/FLAC/ordinals.h | 14 +++++++++++++-
 src/test_streams/main.c |  1 +
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/include/FLAC/ordinals.h b/include/FLAC/ordinals.h
index 647b07e..5a2b6c1 100644
--- a/include/FLAC/ordinals.h
+++ b/include/FLAC/ordinals.h
@@ -35,7 +35,7 @@
 /* If your compiler does not provide <stdint.h> you should provide a replacement
  * which hss suitable replacements for the following intX_T and uintX_t types.
  */
-
+#if !defined(_MSC_VER) || _MSC_VER >= 1600
 #include <stdint.h>
 
 typedef int8_t FLAC__int8;
@@ -47,11 +47,23 @@ typedef int64_t FLAC__int64;
 typedef uint16_t FLAC__uint16;
 typedef uint32_t FLAC__uint32;
 typedef uint64_t FLAC__uint64;
+#else /* defined(_MSC_VER) && _MSC_VER < 1600 */
+typedef __int8 FLAC__int8;
+typedef unsigned __int8 FLAC__uint8;
+
+typedef __int16 FLAC__int16;
+typedef __int32 FLAC__int32;
+typedef __int64 FLAC__int64;
+typedef unsigned __int16 FLAC__uint16;
+typedef unsigned __int32 FLAC__uint32;
+typedef unsigned __int64 FLAC__uint64;
+#endif
 
 typedef int FLAC__bool;
 
 typedef FLAC__uint8 FLAC__byte;
 
+
 #ifdef true
 #undef true
 #endif
diff --git a/src/test_streams/main.c b/src/test_streams/main.c
index 0c87e7f..19fe760 100644
--- a/src/test_streams/main.c
+++ b/src/test_streams/main.c
@@ -23,6 +23,7 @@
 #include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include "share/compat.h"
 #if defined _MSC_VER || defined __MINGW32__
 #include <time.h>
 #else
