diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/ideviceinstaller/001_fix_windows.patch | |
Diffstat (limited to 'vcpkg/ports/ideviceinstaller/001_fix_windows.patch')
| -rw-r--r-- | vcpkg/ports/ideviceinstaller/001_fix_windows.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/vcpkg/ports/ideviceinstaller/001_fix_windows.patch b/vcpkg/ports/ideviceinstaller/001_fix_windows.patch new file mode 100644 index 0000000..16f1149 --- /dev/null +++ b/vcpkg/ports/ideviceinstaller/001_fix_windows.patch @@ -0,0 +1,47 @@ +diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c +index c50bacf..e4a8c3d 100644 +--- a/src/ideviceinstaller.c ++++ b/src/ideviceinstaller.c +@@ -32,7 +32,9 @@ + #include <getopt.h> + #include <errno.h> + #include <time.h> ++#ifndef _MSC_VER + #include <libgen.h> ++#endif + #include <inttypes.h> + #include <limits.h> + #include <sys/stat.h> +@@ -87,6 +89,32 @@ static int asprintf(char **PTR, const char *TEMPLATE, ...) + } + #endif + ++#ifdef _MSC_VER ++#ifndef ISSLASH ++#define ISSLASH(C) ((C) == '/' || (C) == '\\') ++#endif ++char *basename(char const *name) { ++ char const *base = name; ++ char const *p; ++ for (p = base; *p; p++) { ++ if (ISSLASH(*p)) { ++ do p++; ++ while (ISSLASH(*p)); ++ ++ if (!*p) { ++ if (ISSLASH(*base)) ++ base = p - 1; ++ break; ++ } ++ ++ base = p; ++ } ++ } ++ ++ return (char *) base; ++} ++#endif ++ + #define ITUNES_METADATA_PLIST_FILENAME "iTunesMetadata.plist" + + const char PKG_PATH[] = "PublicStaging"; |