summaryrefslogtreecommitdiffstats
path: root/newlib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/include/sys/features.h2
-rw-r--r--newlib/libc/include/time.h16
2 files changed, 17 insertions, 1 deletions
diff --git a/newlib/libc/include/sys/features.h b/newlib/libc/include/sys/features.h
index 5de4bbbe8..e7f9c65dd 100644
--- a/newlib/libc/include/sys/features.h
+++ b/newlib/libc/include/sys/features.h
@@ -102,7 +102,7 @@ extern "C" {
/* #define _POSIX_ASYNCHRONOUS_IO -1 */
/* #define _POSIX_BARRIERS -1 */
#define _POSIX_CHOWN_RESTRICTED 1
-/* #define _POSIX_CLOCK_SELECTION -1 */
+#define _POSIX_CLOCK_SELECTION 200112L
#define _POSIX_CPUTIME 200112L
#define _POSIX_FSYNC 200112L
#define _POSIX_IPV6 200112L
diff --git a/newlib/libc/include/time.h b/newlib/libc/include/time.h
index 7d3b2abd3..306bad619 100644
--- a/newlib/libc/include/time.h
+++ b/newlib/libc/include/time.h
@@ -175,6 +175,22 @@ int _EXFUN(nanosleep, (const struct timespec *rqtp, struct timespec *rmtp));
#endif
#endif /* _POSIX_TIMERS */
+#if defined(_POSIX_CLOCK_SELECTION)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int _EXFUN(clock_nanosleep,
+ (clockid_t clock_id, int flags, const struct timespec *rqtp,
+ struct timespec *rmtp));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _POSIX_CLOCK_SELECTION */
+
#ifdef __cplusplus
extern "C" {
#endif