summaryrefslogtreecommitdiff
path: root/AK/LexicalPath.h
diff options
context:
space:
mode:
authorDennis Bonke <dennis@managarm.org>2022-09-25 20:53:46 +0200
committerAndrew Kaster <andrewdkaster@gmail.com>2022-11-02 22:19:12 -0600
commitb4b7264fa54ab2f7e5f58657b624a0448e99338c (patch)
tree4fefc9514c5532edcf79d51a59e4608fa017bea9 /AK/LexicalPath.h
parent939374a037d4c91857bb650a0b5f39f2b889a435 (diff)
downloadserenity-b4b7264fa54ab2f7e5f58657b624a0448e99338c.zip
AK: Add support for mlibc in LexicalPath
Diffstat (limited to 'AK/LexicalPath.h')
-rw-r--r--AK/LexicalPath.h5
1 files changed, 5 insertions, 0 deletions
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 <AK/String.h>
#include <AK/Vector.h>
+// 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 {