From f67d537c7c3a08b712e620d9892e270ba39c8235 Mon Sep 17 00:00:00 2001 From: drmortalwombat <90205530+drmortalwombat@users.noreply.github.com> Date: Sat, 21 Sep 2024 18:12:10 +0200 Subject: [PATCH] Add abort to stddef calling exit(-1) --- include/stdlib.c | 6 ++++++ include/stdlib.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/include/stdlib.c b/include/stdlib.c index 7b5709e..c9f2ab6 100644 --- a/include/stdlib.c +++ b/include/stdlib.c @@ -524,6 +524,12 @@ void exit(int status) } } +void abort(void) +{ + exit(-1); +} + + extern struct Heap { Heap * next, * end; } HeapNode; diff --git a/include/stdlib.h b/include/stdlib.h index 4d4eac5..eb117e0 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -37,6 +37,8 @@ long labs(long n); void exit(int status); +void abort(void); + void * malloc(unsigned int size); void free(void * ptr);