[PATCH 1/5] Guard ssize_t definition by _SSIZE_T_DECLARED

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Mar 18 10:49:24 UTC 2016


This guard is used by FreeBSD <sys/socket.h> for example.  The FreeBSD
network stack is used in RTEMS.

	* newlib/libc/include/sys/types.h (ssize_t): Guard by
	_SSIZE_T_DECLARED.
---
 newlib/libc/include/sys/types.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index c09866b..52530c5 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -192,7 +192,11 @@ typedef _mode_t mode_t;
 #ifndef __CYGWIN__
 typedef	long key_t;
 #endif
+
+#ifndef _SSIZE_T_DECLARED
 typedef _ssize_t ssize_t;
+#define	_SSIZE_T_DECLARED
+#endif
 
 #if !defined(__CYGWIN__) && !defined(__rtems__)
 #ifdef __MS_types__
-- 
1.8.4.5




More information about the devel mailing list