summaryrefslogtreecommitdiff
path: root/libc/stdlib/atexit.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/atexit.c')
-rw-r--r--libc/stdlib/atexit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/stdlib/atexit.c b/libc/stdlib/atexit.c
index b18e7951d..1ff8d9004 100644
--- a/libc/stdlib/atexit.c
+++ b/libc/stdlib/atexit.c
@@ -51,7 +51,7 @@ static void atexit_handler(void)
int atexit(vfuncp ptr)
{
if ((__uClibc_cleanup == 0) || (__atexit_count >= __UCLIBC_MAX_ATEXIT)) {
- errno = ENOMEM;
+ __set_errno(ENOMEM);
return -1;
}
if (ptr) {