summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/internals/__uClibc_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
index 4a0f840cb..38dbb8f89 100644
--- a/libc/misc/internals/__uClibc_main.c
+++ b/libc/misc/internals/__uClibc_main.c
@@ -72,9 +72,12 @@ __uClibc_main(int argc, char **argv, char **envp)
_stdio_init();
/* Arrange for dtors to run at exit. */
- atexit (&_fini);
+ if (_fini && atexit) {
+ atexit (&_fini);
+ }
/* Run all ctors now. */
- _init();
+ if (_init)
+ _init();
/*
* Note: It is possible that any initialization done above could