mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
fix build for dbus < 1.1.1, re #126, patch from Marc-Andre Lureau
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1750 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
ca059ab9ef
commit
68981e5e97
1 changed files with 11 additions and 1 deletions
|
|
@ -96,7 +96,11 @@ static void handle_io_event(PA_GCC_UNUSED pa_mainloop_api *ea, pa_io_event *e, i
|
|||
unsigned int flags = 0;
|
||||
DBusWatch *watch = userdata;
|
||||
|
||||
#if (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MINOR == 1 && DBUS_VERSION_MICRO >= 1) || (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MAJOR > 1) || (DBUS_VERSION_MAJOR > 1)
|
||||
pa_assert(fd == dbus_watch_get_unix_fd(watch));
|
||||
#else
|
||||
pa_assert(fd == dbus_watch_get_fd(watch));
|
||||
#endif
|
||||
|
||||
if (!dbus_watch_get_enabled(watch)) {
|
||||
pa_log_warn("Asked to handle disabled watch: %p %i", (void*) watch, fd);
|
||||
|
|
@ -137,7 +141,13 @@ static dbus_bool_t add_watch(DBusWatch *watch, void *data) {
|
|||
pa_assert(watch);
|
||||
pa_assert(c);
|
||||
|
||||
ev = c->mainloop->io_new(c->mainloop, dbus_watch_get_unix_fd(watch), get_watch_flags(watch), handle_io_event, watch);
|
||||
ev = c->mainloop->io_new(c->mainloop,
|
||||
#if (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MINOR == 1 && DBUS_VERSION_MICRO >= 1) || (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MAJOR > 1) || (DBUS_VERSION_MAJOR > 1)
|
||||
dbus_watch_get_unix_fd(watch),
|
||||
#else
|
||||
dbus_watch_get_fd(watch),
|
||||
#endif
|
||||
get_watch_flags(watch), handle_io_event, watch);
|
||||
|
||||
dbus_watch_set_data(watch, ev, NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue