[PATCH 4/6] Optional struct _reent::_new::_unused

Sebastian Huber sebastian.huber@embedded-brains.de
Mon May 16 06:55:55 GMT 2022


Provide struct _reent::_new::_unused only if _REENT_BACKWARD_BINARY_COMPAT is
defined.
---
 newlib/libc/include/sys/reent.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index 5f557111e..1884ed982 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -687,6 +687,7 @@ struct _reent
           _mbstate_t _wcsrtombs_state;
 	  int _h_errno;
         } _reent;
+#ifdef _REENT_BACKWARD_BINARY_COMPAT
   /* Two next two fields were once used by malloc.  They are no longer
      used. They are used to preserve the space used before so as to
      allow addition of new reent fields and keep binary compatibility.   */
@@ -696,6 +697,7 @@ struct _reent
           unsigned char * _nextf[_N_LISTS];
           unsigned int _nmalloc[_N_LISTS];
         } _unused;
+#endif
     } _new;
 
 # ifndef _REENT_GLOBAL_ATEXIT
-- 
2.35.3



More information about the Newlib mailing list