summaryrefslogtreecommitdiff
path: root/libc/misc/internals
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-03-14 08:47:21 +0000
committerEric Andersen <andersen@codepoet.org>2002-03-14 08:47:21 +0000
commit608b520c75a4ec4593515a490e74a92632ab51ff (patch)
treed35a894951d6ac895a12c940440080b77a2202b9 /libc/misc/internals
parentab717d4eb20bf6b96685be07d23df9b068b5b29e (diff)
Don't call null ctors/dtors.
-Erik
Diffstat (limited to 'libc/misc/internals')
-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