AK+LibCore: Don't use unsupported features on Android

This commit is contained in:
Andrew Kaster 2023-09-02 17:11:35 +02:00 committed by Andrew Kaster
parent 725584881a
commit 6e8f1549a3
Notes: sideshowbarker 2024-07-18 04:38:32 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@
#include <AK/Platform.h>
#include <AK/StringView.h>
#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

View file

@ -118,7 +118,7 @@ ErrorOr<String> 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();