summaryrefslogtreecommitdiffstats
path: root/sesman
diff options
context:
space:
mode:
authorKoichiro IWAO <meta@vmeta.jp>2016-02-18 00:18:47 +0900
committerKoichiro IWAO <meta@vmeta.jp>2016-02-18 00:45:33 +0900
commit93f7bcb71bf92fedf88fb080fa19dfec3d2e70f7 (patch)
tree5a34f799c4476cba1b26a4ef92e973e484c7e8c5 /sesman
parent3934be93206497f17656534536fdc5e8436b7208 (diff)
downloadxrdp-proprietary-93f7bcb71bf92fedf88fb080fa19dfec3d2e70f7.tar.gz
xrdp-proprietary-93f7bcb71bf92fedf88fb080fa19dfec3d2e70f7.zip
pulse: fix build pulseaudio 6.0 or higher
Discovered in #321. The number of argument for pa_rtpoll_run have been changed since 6.0. >=6.0 : int pa_rtpoll_run(pa_rtpoll *f); <6.0 : int pa_rtpoll_run(pa_rtpoll *f, bool wait); Check pulseaudio version by PA_CHECK_VERSION macro introduced since pulseaudio 0.9.16. In case PA_CHECK_VERSION is not defined, pa_rtpoll_run takes 2 arguments.
Diffstat (limited to 'sesman')
-rw-r--r--sesman/chansrv/pulse/module-xrdp-sink.c4
-rw-r--r--sesman/chansrv/pulse/module-xrdp-source.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/sesman/chansrv/pulse/module-xrdp-sink.c b/sesman/chansrv/pulse/module-xrdp-sink.c
index f56644b9..79cd7b27 100644
--- a/sesman/chansrv/pulse/module-xrdp-sink.c
+++ b/sesman/chansrv/pulse/module-xrdp-sink.c
@@ -440,7 +440,11 @@ static void thread_func(void *userdata) {
pa_rtpoll_set_timer_disabled(u->rtpoll);
}
+#if defined(PA_CHECK_VERSION) && PA_CHECK_VERSION(6, 0, 0)
+ if ((ret = pa_rtpoll_run(u->rtpoll)) < 0) {
+#else
if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0) {
+#endif
goto fail;
}
diff --git a/sesman/chansrv/pulse/module-xrdp-source.c b/sesman/chansrv/pulse/module-xrdp-source.c
index 52409606..78124f9d 100644
--- a/sesman/chansrv/pulse/module-xrdp-source.c
+++ b/sesman/chansrv/pulse/module-xrdp-source.c
@@ -339,8 +339,13 @@ static void thread_func(void *userdata) {
}
/* Hmm, nothing to do. Let's sleep */
- if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0)
+#if defined(PA_CHECK_VERSION) && PA_CHECK_VERSION(6, 0, 0)
+ if ((ret = pa_rtpoll_run(u->rtpoll)) < 0) {
+#else
+ if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0) {
+#endif
goto fail;
+ }
if (ret == 0)
goto finish;