libs/fst: Patch <io.h>

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.
This commit is contained in:
Krystine Sherwin
2024-10-17 07:05:23 +13:00
parent 1055e8ce51
commit 5f83d4d9da
3 changed files with 13 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
--- fst_win_unistd.h
+++ fst_win_unistd.h
@@ -26,7 +26,7 @@
#define WIN_UNISTD_H
#include <stdlib.h>
-#ifdef _WIN64
+#if defined(_MSC_VER)
#include <io.h>
#else
#include <sys/io.h>
+1
View File
@@ -16,3 +16,4 @@ sed -i -e 's,<config.h>,"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
+1 -1
View File
@@ -26,7 +26,7 @@
#define WIN_UNISTD_H
#include <stdlib.h>
#ifdef _WIN64
#if defined(_MSC_VER)
#include <io.h>
#else
#include <sys/io.h>