diff options
Diffstat (limited to 'libc/stdlib/atexit.c')
-rw-r--r-- | libc/stdlib/atexit.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/stdlib/atexit.c b/libc/stdlib/atexit.c index 280f42cb7..c70318148 100644 --- a/libc/stdlib/atexit.c +++ b/libc/stdlib/atexit.c @@ -223,6 +223,11 @@ extern void (*__app_fini)(void); #endif extern void (*__rtld_fini)(void); + +#ifdef _DL_FINI_CRT_COMPAT +extern void (*__dl_fini)(void); +#endif + /* * Normal program termination */ @@ -242,6 +247,9 @@ void exit(int rv) #ifndef _DL_FINI_CRT_COMPAT if (__rtld_fini != NULL) (__rtld_fini)(); +#else + if (__dl_fini != NULL) + (__dl_fini)(); #endif /* If we are using stdio, try to shut it down. At the very least, |