aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r--res/res_musiconhold.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 746fa2d06..04e4a39ee 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -45,6 +45,9 @@
#endif
#include <unistd.h>
#include <sys/ioctl.h>
+#ifdef SOLARIS
+#include <thread.h>
+#endif
#include "asterisk.h"
@@ -508,6 +511,9 @@ static void *monmp3thread(void *data)
}
}
if (class->pseudofd > -1) {
+#ifdef SOLARIS
+ thr_yield();
+#endif
/* Pause some amount of time */
res = read(class->pseudofd, buf, sizeof(buf));
pthread_testcancel();