Merge commit 'refs/merge-requests/4' of git://gitorious.org/dbus-cplusplus/mainline into merge-requests/4
This commit is contained in:
commit
4ac8b072e3
1 changed files with 8 additions and 1 deletions
|
@ -72,7 +72,14 @@ int Watch::descriptor() const
|
|||
#if HAVE_WIN32
|
||||
return dbus_watch_get_socket((DBusWatch*)_int);
|
||||
#else
|
||||
return dbus_watch_get_unix_fd((DBusWatch*)_int);
|
||||
// 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);
|
||||
#else
|
||||
return dbus_watch_get_fd((DBusWatch*)_int);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue