vcpkg/ports/librtmp/fix_strncasecmp.patch

21 lines
507 B
Diff
Raw Normal View History

2017-10-05 20:56:49 +08:00
diff --git a/librtmp/rtmp_sys.h b/librtmp/rtmp_sys.h
2018-01-09 04:12:37 +08:00
index 6a3f215..1b5ac2a 100644
2017-10-05 20:56:49 +08:00
--- a/librtmp/rtmp_sys.h
+++ b/librtmp/rtmp_sys.h
2018-01-09 04:12:37 +08:00
@@ -28,11 +28,13 @@
2017-10-05 20:56:49 +08:00
#include <ws2tcpip.h>
2018-01-09 04:12:37 +08:00
#ifdef _MSC_VER /* MSVC */
+#if _MSC_VER < 1900
#define snprintf _snprintf
-#define strcasecmp stricmp
-#define strncasecmp strnicmp
#define vsnprintf _vsnprintf
#endif
2017-10-05 20:56:49 +08:00
+#define strcasecmp _stricmp
2018-01-09 04:12:37 +08:00
+#define strncasecmp _strnicmp
2017-10-05 20:56:49 +08:00
+#endif
2018-01-09 04:12:37 +08:00
2017-10-05 20:56:49 +08:00
#define GetSockError() WSAGetLastError()
#define SetSockError(e) WSASetLastError(e)