summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorDennis Bonke <dennis@managarm.org>2022-09-25 20:54:06 +0200
committerAndrew Kaster <andrewdkaster@gmail.com>2022-11-02 22:19:12 -0600
commitccb5151291d68eee6c5403b9b72833f080081f44 (patch)
treebfdc15264c63732de11177f0b78d49c2be2ed961 /AK
parentb4b7264fa54ab2f7e5f58657b624a0448e99338c (diff)
downloadserenity-ccb5151291d68eee6c5403b9b72833f080081f44.zip
AK: Add support for mlibc in URL
Diffstat (limited to 'AK')
-rw-r--r--AK/URL.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/AK/URL.h b/AK/URL.h
index 714299e7f0..3f24a80b1c 100644
--- a/AK/URL.h
+++ b/AK/URL.h
@@ -11,6 +11,11 @@
#include <AK/StringView.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 {
// NOTE: The member variables cannot contain any percent encoded sequences.