0001-missing.h-drop-clock_nanosleep-replacement.patch 1.7 KB

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