From 6e8f1549a366932acf039efa4156f7684895c8af Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sat, 2 Sep 2023 17:11:35 +0200 Subject: [PATCH] AK+LibCore: Don't use unsupported features on Android --- AK/Assertions.cpp | 2 +- Userland/Libraries/LibCore/Process.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AK/Assertions.cpp b/AK/Assertions.cpp index 45fb1b97e5f..a1635afae8d 100644 --- a/AK/Assertions.cpp +++ b/AK/Assertions.cpp @@ -9,7 +9,7 @@ #include #include -#if defined(AK_OS_LINUX) || defined(AK_OS_BSD_GENERIC) || defined(AK_OS_SOLARIS) +#if (defined(AK_OS_LINUX) && !defined(AK_OS_ANDROID)) || defined(AK_OS_BSD_GENERIC) || defined(AK_OS_SOLARIS) # define EXECINFO_BACKTRACE #endif diff --git a/Userland/Libraries/LibCore/Process.cpp b/Userland/Libraries/LibCore/Process.cpp index 8ab95960935..5f6851abece 100644 --- a/Userland/Libraries/LibCore/Process.cpp +++ b/Userland/Libraries/LibCore/Process.cpp @@ -118,7 +118,7 @@ ErrorOr Process::get_name() if (rc != 0) return Error::from_syscall("get_process_name"sv, -rc); return String::from_utf8(StringView { buffer, strlen(buffer) }); -#elif defined(AK_OS_LINUX) +#elif defined(AK_OS_LINUX) && !defined(AK_OS_ANDROID) return String::from_utf8(StringView { program_invocation_name, strlen(program_invocation_name) }); #elif defined(AK_OS_BSD_GENERIC) auto const* progname = getprogname();