summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libcsupport/src')
-rw-r--r--cpukit/libcsupport/src/newlibc_exit.c3
-rw-r--r--cpukit/libcsupport/src/open_dev_console.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/libcsupport/src/newlibc_exit.c b/cpukit/libcsupport/src/newlibc_exit.c
index c093bb2a67..53f97b0731 100644
--- a/cpukit/libcsupport/src/newlibc_exit.c
+++ b/cpukit/libcsupport/src/newlibc_exit.c
@@ -14,8 +14,6 @@
#include <rtems.h>
#if defined(RTEMS_NEWLIB)
-#include <rtems/libio.h>
-
#include <stdio.h>
#include <unistd.h>
@@ -41,7 +39,6 @@ void _exit(int status)
FINI_SYMBOL();
#endif
- (*rtems_libio_exit_helper)();
rtems_shutdown_executive(status);
/* does not return */
}
diff --git a/cpukit/libcsupport/src/open_dev_console.c b/cpukit/libcsupport/src/open_dev_console.c
index 6617a785dd..2e111ccf3a 100644
--- a/cpukit/libcsupport/src/open_dev_console.c
+++ b/cpukit/libcsupport/src/open_dev_console.c
@@ -16,6 +16,7 @@
#include <rtems.h>
#include <rtems/libio.h>
#include <fcntl.h>
+#include <stdlib.h>
/*
* This is a replaceable stub which opens the console, if present.
@@ -45,5 +46,7 @@ void rtems_libio_post_driver(void)
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
+
+ atexit(rtems_libio_exit);
}