Przeglądaj źródła

LibC: Make `__assertion_failed` always defined

The symbol should be always defined, in case Serenity is built with
`NDEBUG` defined, and users wants to use `assert` from `LibC`.
Michel Hermier 3 lat temu
rodzic
commit
ee42acddf8
1 zmienionych plików z 1 dodań i 2 usunięć
  1. 1 2
      Userland/Libraries/LibC/assert.cpp

+ 1 - 2
Userland/Libraries/LibC/assert.cpp

@@ -16,7 +16,7 @@
 extern "C" {
 
 extern bool __stdio_is_initialized;
-#ifndef NDEBUG
+
 void __assertion_failed(const char* msg)
 {
     if (__heap_is_stable) {
@@ -32,7 +32,6 @@ void __assertion_failed(const char* msg)
     syscall(SC_set_coredump_metadata, &params);
     abort();
 }
-#endif
 }
 
 void _abort()