Due to uclic-ng supports clock_nanosleep without enabled threads we do
not need to provide clock_nanosleep in that case.

Cc: Richard Cochran <richardcoch...@gmail.com>
Signed-off-by: Heiko Thiery <heiko.thi...@gmail.com>
---
 missing.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/missing.h b/missing.h
index 35eaf15..89cb513 100644
--- a/missing.h
+++ b/missing.h
@@ -262,6 +262,15 @@ enum {
 
 #define TFD_TIMER_ABSTIME (1 << 0)
 
+/*
+ * clock_nanosleep is supported in uclic-ng since v1.0.31 even without threads.
+ */
+#if defined __USE_XOPEN2K && defined __UCLIBC_HAS_ADVANCED_REALTIME__
+
+#include <sys/time.h>
+
+#else
+
 static inline int clock_nanosleep(clockid_t clock_id, int flags,
                                  const struct timespec *request,
                                  struct timespec *remain)
@@ -269,6 +278,8 @@ static inline int clock_nanosleep(clockid_t clock_id, int 
flags,
        return syscall(__NR_clock_nanosleep, clock_id, flags, request, remain);
 }
 
+#endif
+
 static inline int timerfd_create(int clockid, int flags)
 {
        return syscall(__NR_timerfd_create, clockid, flags);
-- 
2.20.1



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to