From 99378114e056076f2ffb7fc5071fed612d2e0c77 Mon Sep 17 00:00:00 2001 From: RobinTF <83676088+RobinTF@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:01:01 +0100 Subject: [PATCH] Try to fix build errors with macro redefinition --- src/util/ConfigManager/ConfigShorthandVisitor.h | 2 ++ src/util/Log.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/util/ConfigManager/ConfigShorthandVisitor.h b/src/util/ConfigManager/ConfigShorthandVisitor.h index d4de4de11c..633478b438 100644 --- a/src/util/ConfigManager/ConfigShorthandVisitor.h +++ b/src/util/ConfigManager/ConfigShorthandVisitor.h @@ -4,7 +4,9 @@ #pragma once // ANTLR runtime uses this as a variable name. +#ifdef EOF #undef EOF +#endif #include #include "util/ConfigManager/generated/ConfigShorthandParser.h" diff --git a/src/util/Log.h b/src/util/Log.h index 8358510039..1ba7277fb0 100644 --- a/src/util/Log.h +++ b/src/util/Log.h @@ -20,6 +20,11 @@ #define LOGLEVEL INFO #endif +// Abseil does also define its own LOG macro, so we need to undefine it here. +#ifdef LOG +#undef LOG +#endif + #define LOG(x) \ if (x > LOGLEVEL) \ ; \