Commit b8365f21684ea062ed03d948993426a7f202e542

Jacques Germishuys 2014-07-05T21:24:26

strnlen() is only available from Visual Studio 2005+

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/strnlen.h b/src/strnlen.h
index fdd7fe3..eecfe3c 100644
--- a/src/strnlen.h
+++ b/src/strnlen.h
@@ -7,7 +7,8 @@
 #ifndef INCLUDE_strlen_h__
 #define INCLUDE_strlen_h__
 
-#if defined(__MINGW32__) || defined(__sun) || defined(__APPLE__) || defined(__MidnightBSD__)
+#if defined(__MINGW32__) || defined(__sun) || defined(__APPLE__) || defined(__MidnightBSD__) ||\
+	(defined(_MSC_VER) && _MSC_VER < 1500)
 #   define NO_STRNLEN
 #endif