0006-posix-thread-add-a-hack-to-work-around-crashes-when-.patch 973 B

12345678910111213141516171819202122232425262728293031323334353637
  1. From 3f8a7690dd27e55abc087894f1998be7f8418047 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
  3. Date: Thu, 18 Oct 2012 18:38:17 +0200
  4. Subject: [PATCH 6/8] posix/thread: add a hack to work-around crashes when
  5. using the buggy iOS 6 runtime
  6. ---
  7. src/posix/thread.c | 12 ++++++++++++
  8. 1 file changed, 12 insertions(+)
  9. diff --git a/src/posix/thread.c b/src/posix/thread.c
  10. index 514f592..6a95bb0 100644
  11. --- a/src/posix/thread.c
  12. +++ b/src/posix/thread.c
  13. @@ -355,6 +355,18 @@ void vlc_cond_init_daytime (vlc_cond_t *p_condvar)
  14. void vlc_cond_destroy (vlc_cond_t *p_condvar)
  15. {
  16. int val = pthread_cond_destroy( p_condvar );
  17. +
  18. +#ifdef __APPLE__
  19. + if (val != 0) {
  20. + printf("pthread_cond_destroy returned %i\n", val);
  21. +
  22. + if (val == EBUSY) {
  23. + printf("this is a EBUSY!\n");
  24. + return;
  25. + }
  26. + }
  27. +#endif
  28. +
  29. VLC_THREAD_ASSERT ("destroying condition");
  30. }
  31. --
  32. 1.7.10.2 (Apple Git-33)