1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:17:36 +00:00

AK, LibCore: Enable misc things on glibc

program_invocation_name, pthread_getattr_np(), EXECINFO_BACKTRACE are
all glibc specifics (that other libcs may also have).
This commit is contained in:
Sergey Bugaev 2023-09-03 22:07:23 +03:00 committed by Andrew Kaster
parent 0143e5a36d
commit 4825919bcf
3 changed files with 5 additions and 5 deletions

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) && !defined(AK_OS_ANDROID)
#elif defined(AK_LIBC_GLIBC) || (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();