diff options
Diffstat (limited to 'tbb.patch')
-rw-r--r-- | tbb.patch | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tbb.patch b/tbb.patch index f9a63f3e7cdc..541b9f942012 100644 --- a/tbb.patch +++ b/tbb.patch @@ -1,19 +1,33 @@ --- a/src/gui/state/game/game.h +++ b/src/gui/state/game/game.h -@@ -26,6 +26,8 @@ +@@ -26,6 +26,18 @@ #ifndef LOOT_GUI_STATE_GAME_GAME #define LOOT_GUI_STATE_GAME_GAME ++#ifndef _WIN32 ++#ifdef emit ++// The TBB library is used on Linux to provide the implementation of the ++// standard library parallel execution algorithms, but oneTBB 2021.8.0 defines ++// an emit() function that clashes with Qt's emit macro, which may be defined ++// when this header is included. As such, undefine the macro before including ++// the standard library headers, and redefine it afterwards. +#undef emit ++#define LOOT_SHOULD_REDEFINE_EMIT ++#endif ++#endif + #include <execution> #include <filesystem> #include <functional> -@@ -34,6 +36,8 @@ +@@ -34,6 +46,12 @@ #include <string> #include <variant> ++#ifdef LOOT_SHOULD_REDEFINE_EMIT ++// Assume emit was Qt's emit macro, which is empty. +#define emit ++#undef LOOT_SHOULD_REDEFINE_EMIT ++#endif + #include "gui/state/game/game_settings.h" #include "gui/state/logging.h" |