From a27ab63c96a4236a0aa57953085e629fd83eb53f Mon Sep 17 00:00:00 2001 From: modeco80 Date: Thu, 22 Sep 2022 05:58:53 -0500 Subject: [PATCH] eupak: Add bodge for MinGW compilation also fix paktest, oops. --- src/tools/eupak/tasks/InfoTask.cpp | 6 ++++++ src/tools/paktest.cpp | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tools/eupak/tasks/InfoTask.cpp b/src/tools/eupak/tasks/InfoTask.cpp index 13167d7..36d3ce5 100644 --- a/src/tools/eupak/tasks/InfoTask.cpp +++ b/src/tools/eupak/tasks/InfoTask.cpp @@ -6,6 +6,12 @@ // SPDX-License-Identifier: GPL-3.0-or-later // + +// MinGW bodges are cool. +#if defined(_WIN32) && !defined(_MSC_VER) + #define _POSIX_THREAD_SAFE_FUNCTIONS +#endif + #include #include diff --git a/src/tools/paktest.cpp b/src/tools/paktest.cpp index 1796c54..d444cc2 100644 --- a/src/tools/paktest.cpp +++ b/src/tools/paktest.cpp @@ -29,11 +29,11 @@ int main(int argc, char** argv) { if(argv[3] != nullptr) { if(!strcmp(argv[3], "--jedi")) { std::cout << "Writing Jedi Starfighter archive\n"; - writer.Init(structs::PakVersion::Ver2); + writer.Init(structs::PakHeader::Version::Ver5); } } else { std::cout << "Writing Starfighter archive\n"; - writer.Init(structs::PakVersion::Starfighter); + writer.Init(structs::PakHeader::Version::Ver4); } // Read pak data and vomit it into the writer.