From 5f83d4d9da90f4964f9f258ff3f40dc838e967f0 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Thu, 17 Oct 2024 07:05:23 +1300 Subject: [PATCH] libs/fst: Patch I think what's happening here is that the _WIN64 fix is correct for 64bit windows, but (for whatever reason) the visual studio build is targeting 32bit windows, so the fix is unnecessary, but the upstream fix doesn't expect to be targeting 32bit windows and assumes all windows builds are 64bit... so fix that. --- libs/fst/00_PATCH_win_io.patch | 11 +++++++++++ libs/fst/00_UPDATE.sh | 1 + libs/fst/fst_win_unistd.h | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 libs/fst/00_PATCH_win_io.patch diff --git a/libs/fst/00_PATCH_win_io.patch b/libs/fst/00_PATCH_win_io.patch new file mode 100644 index 000000000..5813758cd --- /dev/null +++ b/libs/fst/00_PATCH_win_io.patch @@ -0,0 +1,11 @@ +--- fst_win_unistd.h ++++ fst_win_unistd.h +@@ -26,7 +26,7 @@ + #define WIN_UNISTD_H + + #include +-#ifdef _WIN64 ++#if defined(_MSC_VER) + #include + #else + #include diff --git a/libs/fst/00_UPDATE.sh b/libs/fst/00_UPDATE.sh index f7066076f..aef0e4fe8 100755 --- a/libs/fst/00_UPDATE.sh +++ b/libs/fst/00_UPDATE.sh @@ -16,3 +16,4 @@ sed -i -e 's,,"config.h",' *.cc *.h sed -i -e 's,"fastlz.c","fastlz.cc",' *.cc *.h patch -p0 < 00_PATCH_win_zlib.patch +patch -p0 < 00_PATCH_win_io.patch diff --git a/libs/fst/fst_win_unistd.h b/libs/fst/fst_win_unistd.h index 15ab2c1fc..089f0180b 100644 --- a/libs/fst/fst_win_unistd.h +++ b/libs/fst/fst_win_unistd.h @@ -26,7 +26,7 @@ #define WIN_UNISTD_H #include -#ifdef _WIN64 +#if defined(_MSC_VER) #include #else #include