aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libusbmuxd/003_fix_msvc.patch
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libusbmuxd/003_fix_msvc.patch
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/libusbmuxd/003_fix_msvc.patch')
-rw-r--r--vcpkg/ports/libusbmuxd/003_fix_msvc.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/vcpkg/ports/libusbmuxd/003_fix_msvc.patch b/vcpkg/ports/libusbmuxd/003_fix_msvc.patch
new file mode 100644
index 0000000..e285d22
--- /dev/null
+++ b/vcpkg/ports/libusbmuxd/003_fix_msvc.patch
@@ -0,0 +1,37 @@
+diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c
+index 95e322f..c5c8f09 100644
+--- a/src/libusbmuxd.c
++++ b/src/libusbmuxd.c
+@@ -49,7 +49,9 @@
+ #define ECONNREFUSED 107
+ #endif
+
++#ifndef _MSC_VER
+ #include <unistd.h>
++#endif
+ #include <signal.h>
+
+ #ifdef WIN32
+@@ -91,6 +93,10 @@ static char* stpncpy(char *dst, const char *src, size_t len)
+ }
+ #endif
+
++#ifdef _MSC_VER
++#define strcasecmp _stricmp
++#endif
++
+ #include <plist/plist.h>
+ #define PLIST_CLIENT_VERSION_STRING PACKAGE_STRING
+ #define PLIST_LIBUSBMUX_VERSION 3
+@@ -1590,7 +1596,11 @@ USBMUXD_API int usbmuxd_send(int sfd, const char *data, uint32_t len, uint32_t *
+ num_sent = socket_send(sfd, (void*)data, len);
+ if (num_sent < 0) {
+ *sent_bytes = 0;
++#ifdef WIN32
++ num_sent = WSAGetLastError();
++#else
+ num_sent = errno;
++#endif
+ LIBUSBMUXD_DEBUG(1, "%s: Error %d when sending: %s\n", __func__, num_sent, strerror(num_sent));
+ return -num_sent;
+ }