From 9ffc2fe840f45e367d3fa9a6fbabbe4c61c30287 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sat, 8 May 2021 20:46:06 +0200 Subject: [PATCH] LibC: Implement the _Exit function libstdc++v3 checks whether this function is available and makes certain functions available in the std namespace if so. --- Userland/Libraries/LibC/stdlib.cpp | 5 +++++ Userland/Libraries/LibC/stdlib.h | 1 + 2 files changed, 6 insertions(+) diff --git a/Userland/Libraries/LibC/stdlib.cpp b/Userland/Libraries/LibC/stdlib.cpp index cd4db3b5d6..6811c5f537 100644 --- a/Userland/Libraries/LibC/stdlib.cpp +++ b/Userland/Libraries/LibC/stdlib.cpp @@ -1180,3 +1180,8 @@ int unlockpt([[maybe_unused]] int fd) return 0; } } + +void _Exit(int status) +{ + _exit(status); +} diff --git a/Userland/Libraries/LibC/stdlib.h b/Userland/Libraries/LibC/stdlib.h index fc029d2ce3..480e570cc7 100644 --- a/Userland/Libraries/LibC/stdlib.h +++ b/Userland/Libraries/LibC/stdlib.h @@ -61,6 +61,7 @@ int mbtowc(wchar_t*, const char*, size_t); int wctomb(char*, wchar_t); size_t wcstombs(char*, const wchar_t*, size_t); char* realpath(const char* pathname, char* buffer); +__attribute__((noreturn)) void _Exit(int status); #define RAND_MAX 32767 int rand();