From 9948f2412d388c6e13d7ce35b1c9d12f964beac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucca=20Jim=C3=A9nez=20K=C3=B6nings?= Date: Fri, 19 Jan 2024 14:09:56 +0100 Subject: [PATCH] move undef macros into Compat.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lucca Jiménez Könings --- include/Compat.h | 3 +++ src/Common.cpp | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/Compat.h b/include/Compat.h index b993074..26bdbe5 100644 --- a/include/Compat.h +++ b/include/Compat.h @@ -16,6 +16,9 @@ char _getch(); #include #include char _getch(); +// macros 'major' and 'minor' need to be undefined on FreeBSD to avoid naming collision with system headers +#undef major +#undef minor #endif // freebsd // ======================= APPLE ======================== diff --git a/src/Common.cpp b/src/Common.cpp index c40819e..c16f953 100644 --- a/src/Common.cpp +++ b/src/Common.cpp @@ -291,12 +291,6 @@ TEST_CASE("RegisterThread") { CHECK(threadNameMap.at(std::this_thread::get_id()) == "MyThread"); } -// macros below need to be undefined on FreeBSD as to avoid naming collision with system headers -#ifdef BEAMMP_FREEBSD - #undef major - #undef minor -#endif - Version::Version(uint8_t major, uint8_t minor, uint8_t patch) : major(major) , minor(minor)