1From 947bf03ec3d9eaa0bfc0269eed86b9364e94bc1a Mon Sep 17 00:00:00 2001 2From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> 3Date: Sun, 5 Aug 2018 15:25:53 +0200 4Subject: [PATCH] missing.h: drop clock_nanosleep() replacement 5 6Since uClibc-ng commits 68628fe7d463541bf3c33da6b214e63c0cc9feed 7("librt: declare clock_nanosleep not only for NPTL") and 8ddbb03e77ac1a48740688814b82f45c97ee81f37 ("librt: clock_nanosleep 9could be even used without threads"), clock_nanosleep() is always 10provided by uClibc, regardless of the thread implementation (none, 11linuxthreads, nptl). These commits will be part of the upcoming 1.0.31 12release of uClibc-ng. 13 14Thanks to this, we can drop the replacement clock_nanosleep() 15implementation added by linuxptp. Without this, linuxptp fails to 16build with: 17 18missing.h:117:19: error: static declaration of 'clock_nanosleep' follows non-static declaration 19 static inline int clock_nanosleep(clockid_t clock_id, int flags, 20 ^~~~~~~~~~~~~~~ 21In file included from clockadj.h:24:0, 22 from clockadj.c:24: 23 24Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> 25--- 26 missing.h | 7 ------- 27 1 file changed, 7 deletions(-) 28 29diff --git a/missing.h b/missing.h 30index 2f7adb9..60f89a3 100644 31--- a/missing.h 32+++ b/missing.h 33@@ -129,13 +129,6 @@ enum { 34 35 #define TFD_TIMER_ABSTIME (1 << 0) 36 37-static inline int clock_nanosleep(clockid_t clock_id, int flags, 38- const struct timespec *request, 39- struct timespec *remain) 40-{ 41- return syscall(__NR_clock_nanosleep, clock_id, flags, request, remain); 42-} 43- 44 static inline int timerfd_create(int clockid, int flags) 45 { 46 return syscall(__NR_timerfd_create, clockid, flags); 47-- 482.14.4 49 50