aboutsummaryrefslogtreecommitdiff
path: root/ports/libusbmuxd/fix-win-build.patch
blob: a1b7f2ef23faec6658624d9dec53a8ce774c3cd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c
index e85cf4a..35ed1b5 100644
--- a/src/libusbmuxd.c
+++ b/src/libusbmuxd.c
@@ -86,6 +86,15 @@ static char* stpncpy(char *dst, const char *src, size_t len)
 }
 #endif
 
+#ifdef WIN32
+int strcasecmp(char *s1, char *s2)
+{
+   while  (toupper((unsigned char)*s1) == toupper((unsigned char)*s2++))
+       if (*s1++ == '\0') return 0;
+   return(toupper((unsigned char)*s1) - toupper((unsigned char)*--s2));
+}
+#endif
+
 #include <plist/plist.h>
 #define PLIST_CLIENT_VERSION_STRING PACKAGE_STRING
 #define PLIST_LIBUSBMUX_VERSION 3