Fix abort(3) not being freestanding.
This commit is contained in:
parent
90036ca6a8
commit
63ad7d64dd
|
@ -24,8 +24,22 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#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)
|
extern "C" void abort(void)
|
||||||
{
|
{
|
||||||
// TODO: Send SIGABRT instead!
|
// TODO: Send SIGABRT instead!
|
||||||
_Exit(128 + 6);
|
_Exit(128 + 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue