0008-fix-fallback-code-and-add-required-realtime-library.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 381bcb7cb03bb602351a323daf3b69b2d4f45e77 Mon Sep 17 00:00:00 2001
  2. From: Waldemar Brodkorb <wbx@openadk.org>
  3. Date: Fri, 26 Aug 2016 15:11:25 +0200
  4. Subject: [PATCH] fix fallback code and add required realtime library to link
  5. command
  6. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
  7. ---
  8. configure.ac | 1 +
  9. src/posix/thread.c | 2 +-
  10. 2 files changed, 2 insertions(+), 1 deletion(-)
  11. diff --git a/configure.ac b/configure.ac
  12. index cb1de25..018c11c 100644
  13. --- a/configure.ac
  14. +++ b/configure.ac
  15. @@ -121,6 +121,7 @@ case "${host_os}" in
  16. ;;
  17. linux*)
  18. SYS=linux
  19. + AC_CHECK_LIB([rt], [posix_spawnp], [VLC_ADD_LIBS([libvlccore],[-lrt])], [], [])
  20. ;;
  21. bsdi*)
  22. SYS=bsdi
  23. diff --git a/src/posix/thread.c b/src/posix/thread.c
  24. index 07fa71e..8b8595f 100644
  25. --- a/src/posix/thread.c
  26. +++ b/src/posix/thread.c
  27. @@ -85,7 +85,7 @@ static clockid_t vlc_clock_id;
  28. static void vlc_clock_setup_once (void)
  29. {
  30. -# if (_POSIX_MONOTONIC_CLOCK == 0)
  31. +# if (_POSIX_MONOTONIC_CLOCK == 0) && (_POSIX_CLOCK_SELECTION > 0)
  32. long val = sysconf (_SC_MONOTONIC_CLOCK);
  33. assert (val != 0);
  34. vlc_clock_id = (val < 0) ? CLOCK_REALTIME : CLOCK_MONOTONIC;
  35. --
  36. 2.1.4