[PATCH 5/6] Optional struct _reent::_new::_reent::_unused_rand
Sebastian Huber
sebastian.huber@embedded-brains.de
Mon May 16 06:55:56 GMT 2022
Provide struct _reent::_new::_reent::_unused_rand only if
_REENT_BACKWARD_BINARY_COMPAT is defined.
---
newlib/libc/include/sys/reent.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index 1884ed982..4683ecc2f 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -344,9 +344,11 @@ struct _rand48 {
#ifdef _REENT_BACKWARD_BINARY_COMPAT
#define _REENT_INIT_UNUSED_LOCALE_INFO 0,
+#define _REENT_INIT_UNUSED_RAND 0,
#define _REENT_INIT_UNUSED_SDIDINIT 0,
#else
#define _REENT_INIT_UNUSED_LOCALE_INFO /* Nothing to initialize */
+#define _REENT_INIT_UNUSED_RAND /* Nothing to initialize */
#define _REENT_INIT_UNUSED_SDIDINIT /* Nothing to initialize */
#endif
@@ -667,7 +669,9 @@ struct _reent
{
struct
{
+#ifdef _REENT_BACKWARD_BINARY_COMPAT
unsigned int _unused_rand;
+#endif
char * _strtok_last;
char _asctime_buf[_REENT_ASCTIME_SIZE];
struct __tm _localtime_buf;
@@ -749,7 +753,7 @@ struct _reent
_NULL, \
{ \
{ \
- 0, \
+ _REENT_INIT_UNUSED_RAND \
_NULL, \
"", \
{0, 0, 0, 0, 0, 0, 0, 0, 0}, \
--
2.35.3
More information about the Newlib
mailing list