libs/fst: Patch for zlib on windows

This commit is contained in:
Krystine Sherwin 2024-10-17 07:05:23 +13:00
parent c4a0845207
commit a54721aa39
No known key found for this signature in database
3 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,16 @@
--- fstapi.h
+++ fstapi.h
@@ -33,11 +33,12 @@ extern "C" {
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-#include <zlib.h>
#include <inttypes.h>
#if defined(_MSC_VER)
+ #include "libs/zlib/zlib.h"
#include "fst_win_unistd.h"
#else
+ #include <zlib.h>
#include <unistd.h>
#endif
#include <time.h>

View File

@ -14,3 +14,5 @@ mv config.h.bak config.h
sed -i -e 's,<config.h>,"config.h",' *.cc *.h sed -i -e 's,<config.h>,"config.h",' *.cc *.h
sed -i -e 's,"fastlz.c","fastlz.cc",' *.cc *.h sed -i -e 's,"fastlz.c","fastlz.cc",' *.cc *.h
patch -p0 < 00_PATCH_win_zlib.patch

View File

@ -33,11 +33,12 @@ extern "C" {
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include <zlib.h>
#include <inttypes.h> #include <inttypes.h>
#if defined(_MSC_VER) #if defined(_MSC_VER)
#include "libs/zlib/zlib.h"
#include "fst_win_unistd.h" #include "fst_win_unistd.h"
#else #else
#include <zlib.h>
#include <unistd.h> #include <unistd.h>
#endif #endif
#include <time.h> #include <time.h>