Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-15 14:44:24 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-04-15 15:51:40 +0300
commit75ab33bd5ed5049c2e7c66cb8f72112698d5adef (patch)
tree8b6ae524fc60306adaa7e9470abd9a0a01b46888 /newlib
parent4fda5a75fd69dfea40e50548b0c492e7e97e0c55 (diff)
Add BSD guard for useconds_t
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Diffstat (limited to 'newlib')
-rw-r--r--newlib/libc/include/sys/_types.h1
-rw-r--r--newlib/libc/include/sys/types.h5
2 files changed, 5 insertions, 1 deletions
diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 32e7fefb1..041ad7497 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 3e803c3ab..f02f170e0 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;