diff --git a/libs/fst/00_PATCH_win_zlib.patch b/libs/fst/00_PATCH_win_zlib.patch new file mode 100644 index 000000000..125e7cf58 --- /dev/null +++ b/libs/fst/00_PATCH_win_zlib.patch @@ -0,0 +1,16 @@ +--- fstapi.h ++++ fstapi.h +@@ -33,11 +33,12 @@ extern "C" { + #include + #include + #include +-#include + #include + #if defined(_MSC_VER) ++ #include "libs/zlib/zlib.h" + #include "fst_win_unistd.h" + #else ++ #include + #include + #endif + #include diff --git a/libs/fst/00_UPDATE.sh b/libs/fst/00_UPDATE.sh index db97fd8bb..f7066076f 100755 --- a/libs/fst/00_UPDATE.sh +++ b/libs/fst/00_UPDATE.sh @@ -14,3 +14,5 @@ mv config.h.bak config.h 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 diff --git a/libs/fst/fstapi.h b/libs/fst/fstapi.h index e2ca1783a..ba58c2017 100644 --- a/libs/fst/fstapi.h +++ b/libs/fst/fstapi.h @@ -33,11 +33,12 @@ extern "C" { #include #include #include -#include #include #if defined(_MSC_VER) + #include "libs/zlib/zlib.h" #include "fst_win_unistd.h" #else + #include #include #endif #include