diff options
author | Chris Johns <chrisj@rtems.org> | 2020-02-14 15:16:46 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2020-02-19 19:01:08 +1100 |
commit | fe09d8d4d3c8c663217be1d1db49fb579bfdadbe (patch) | |
tree | 5d7c05e09551c6d58f9cedfa8b3cdde1a22ed7d8 /cpukit | |
parent | shell: Correct argument order of `mfill` (diff) | |
download | rtems-fe09d8d4d3c8c663217be1d1db49fb579bfdadbe.tar.bz2 |
libcsupport/newlib: Call newlib's __sinit to force reent initialisation
- Newlib overtites any FILE pointers set in stdin, stdout or stderr.
Closes #3870
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/libcsupport/src/newlibc_reent.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/libcsupport/src/newlibc_reent.c b/cpukit/libcsupport/src/newlibc_reent.c index 430157cf0f..6dc0b1eeaa 100644 --- a/cpukit/libcsupport/src/newlibc_reent.c +++ b/cpukit/libcsupport/src/newlibc_reent.c @@ -44,7 +44,10 @@ bool newlib_create_hook( } #endif - _REENT_INIT_PTR((creating_task->libc_reent)); /* GCC extension: structure constants */ + extern void __sinit (struct _reent *s); + struct _reent *reent = (struct _reent *) creating_task->libc_reent; + _REENT_INIT_PTR((reent)); /* GCC extension: structure constants */ + __sinit( reent ); return true; } |