summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDionna Glaze <dionnaglaze@google.com>2017-06-29 08:30:04 +0200
committerCorinna Vinschen <corinna@vinschen.de>2017-06-29 08:30:33 +0200
commitf70aad3de4d845f8b720010a2f8817db842d81e8 (patch)
treec99e2cfcb16d178422cb353ff35912100854054f
parentd54ee34e23868d1d195495298c30ee831eb2927f (diff)
downloadcygnal-f70aad3de4d845f8b720010a2f8817db842d81e8.tar.gz
cygnal-f70aad3de4d845f8b720010a2f8817db842d81e8.tar.bz2
cygnal-f70aad3de4d845f8b720010a2f8817db842d81e8.zip
Make gethostname, getdtablesize, mktemp, ualarm available in BSD, XOPEN_SOURCE >= 500.
-rw-r--r--newlib/libc/include/sys/unistd.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h
index 84219ca2e..b60d34044 100644
--- a/newlib/libc/include/sys/unistd.h
+++ b/newlib/libc/include/sys/unistd.h
@@ -259,9 +259,8 @@ int _EXFUN(truncate, (const char *, off_t __length));
#endif
#endif
-#if defined(__CYGWIN__) || defined(__rtems__)
+#if defined(__BSD_VISIBLE) || (__XSI_VISIBLE >= 500)
int _EXFUN(getdtablesize, (void));
-int _EXFUN(setdtablesize, (int));
useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval));
#if !(defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS))
/* winsock[2].h defines as __stdcall, and with int as 2nd arg */
@@ -270,6 +269,10 @@ useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval));
char * _EXFUN(mktemp, (char *));
#endif
+#if defined(__CYGWIN__) || defined(__rtems__)
+int _EXFUN(setdtablesize, (int));
+#endif
+
#if defined(__CYGWIN__) || defined(__SPU__) || defined(__rtems__)
void _EXFUN(sync, (void));
#endif