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:23 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-04-15 15:51:40 +0300
commit4fda5a75fd69dfea40e50548b0c492e7e97e0c55 (patch)
treea692dcb4ee0e16f07e33e5c7c6de046b07afd18b /newlib
parentf3e587d30a9f65d0c6551ad14095300f6e81672e (diff)
Add BSD guard for nlink_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 88a18b310..32e7fefb1 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -173,6 +173,7 @@ typedef _CLOCKID_T_ __clockid_t;
#define _TIMER_T_ unsigned long
typedef _TIMER_T_ __timer_t;
+typedef unsigned short __nlink_t;
typedef long __suseconds_t; /* microseconds (signed) */
#endif /* _SYS__TYPES_H */
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 6d9865cfc..3e803c3ab 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -205,7 +205,10 @@ typedef __mode_t mode_t; /* permissions */
#define _MODE_T_DECLARED
#endif
-typedef unsigned short nlink_t;
+#ifndef _NLINK_T_DECLARED
+typedef __nlink_t nlink_t; /* link count */
+#define _NLINK_T_DECLARED
+#endif
#if !defined(__clockid_t_defined) && !defined(_CLOCKID_T_DECLARED)
typedef __clockid_t clockid_t;