[PATCH 13/18] Add BSD guard for useconds_t

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Apr 14 11:54:42 UTC 2016


Signed-off-by: Sebastian Huber <sebastian.huber at embedded-brains.de>
---
 newlib/libc/include/sys/_types.h | 1 +
 newlib/libc/include/sys/types.h  | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 61fc1c5..03e1ba3 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -175,5 +175,6 @@ typedef	_TIMER_T_	__timer_t;
 
 typedef	unsigned short	__nlink_t;
 typedef	long		__suseconds_t;	/* microseconds (signed) */
+typedef	unsigned long	__useconds_t;	/* microseconds (unsigned) */
 
 #endif	/* _SYS__TYPES_H */
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 3e803c3..f02f170 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -222,7 +222,10 @@ typedef	__timer_t	timer_t;
 #define	_TIMER_T_DECLARED
 #endif
 
-typedef unsigned long useconds_t;
+#ifndef _USECONDS_T_DECLARED
+typedef	__useconds_t	useconds_t;	/* microseconds (unsigned) */
+#define	_USECONDS_T_DECLARED
+#endif
 
 #ifndef _SUSECONDS_T_DECLARED
 typedef	__suseconds_t	suseconds_t;
-- 
1.8.4.5




More information about the devel mailing list