From b4b7264fa54ab2f7e5f58657b624a0448e99338c Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Sun, 25 Sep 2022 20:53:46 +0200 Subject: [PATCH] AK: Add support for mlibc in LexicalPath --- AK/LexicalPath.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AK/LexicalPath.h b/AK/LexicalPath.h index 54de349708..0081133db8 100644 --- a/AK/LexicalPath.h +++ b/AK/LexicalPath.h @@ -10,6 +10,11 @@ #include #include +// On Linux distros that use mlibc `basename` is defined as a macro that expands to `__mlibc_gnu_basename` or `__mlibc_gnu_basename_c`, so we undefine it. +#if defined(AK_OS_LINUX) && defined(basename) +# undef basename +#endif + namespace AK { class LexicalPath {