From add6e3da07298b64f79a550ece50d96ffe981905 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Thu, 22 Jun 2023 10:13:25 +0200 Subject: [PATCH] Prevent libarchive from pulling in Windows.h --- src/dwarfs/filesystem_extractor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dwarfs/filesystem_extractor.cpp b/src/dwarfs/filesystem_extractor.cpp index e7fb7894..36af7dad 100644 --- a/src/dwarfs/filesystem_extractor.cpp +++ b/src/dwarfs/filesystem_extractor.cpp @@ -25,6 +25,12 @@ #include #include +// This is required to avoid Windows.h being pulled in by libarchive +// and polluting our environment with all sorts of shit. +#if _WIN32 +#include +#endif + #include #include