Fix abort(3) not being freestanding.

This commit is contained in:
Jonas 'Sortie' Termansen 2013-08-20 00:45:03 +02:00
parent 90036ca6a8
commit 63ad7d64dd
1 changed files with 14 additions and 0 deletions

View File

@ -24,8 +24,22 @@
#include <stdlib.h>
#if defined(SORTIX_KERNEL)
#include <sortix/kernel/platform.h>
#include <sortix/kernel/panic.h>
extern "C" void abort(void)
{
Sortix::PanicF("abort()");
}
#else
extern "C" void abort(void)
{
// TODO: Send SIGABRT instead!
_Exit(128 + 6);
}
#endif