move undef macros into Compat.h

Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
This commit is contained in:
Lucca Jiménez Könings 2024-01-19 14:09:56 +01:00
parent a22ad66d2b
commit 4d0864790a
No known key found for this signature in database
2 changed files with 3 additions and 6 deletions

View File

@ -16,6 +16,9 @@ char _getch();
#include <termios.h> #include <termios.h>
#include <unistd.h> #include <unistd.h>
char _getch(); 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 #endif // freebsd
// ======================= APPLE ======================== // ======================= APPLE ========================

View File

@ -291,12 +291,6 @@ TEST_CASE("RegisterThread") {
CHECK(threadNameMap.at(std::this_thread::get_id()) == "MyThread"); 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) Version::Version(uint8_t major, uint8_t minor, uint8_t patch)
: major(major) : major(major)
, minor(minor) , minor(minor)