use dbus_watch_get_unix_fd() only in dbus >= 1.1.1
This commit is contained in:
parent
b23f1b2eab
commit
3f1ca07e13
1 changed files with 8 additions and 1 deletions
|
@ -72,7 +72,14 @@ int Watch::descriptor() const
|
||||||
#if HAVE_WIN32
|
#if HAVE_WIN32
|
||||||
return dbus_watch_get_socket((DBusWatch*)_int);
|
return dbus_watch_get_socket((DBusWatch*)_int);
|
||||||
#else
|
#else
|
||||||
|
// check dbus version and use dbus_watch_get_unix_fd() only in dbus >= 1.1.1
|
||||||
|
#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)
|
||||||
return dbus_watch_get_unix_fd((DBusWatch*)_int);
|
return dbus_watch_get_unix_fd((DBusWatch*)_int);
|
||||||
|
#else
|
||||||
|
return dbus_watch_get_fd((DBusWatch*)_int);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue