udev: make use of udev_enumerate_add_match_tag() only when it is available

udev_enumerate_add_match_tag() and udev_monitor_filter_add_match_tag()
are mostly optimizations, hence simply skip these calls if they are not
available in the installed version of libudev.

This should fix the build on older versions of udev.

[airlied: fixes tinderbox failures on RHEL6]

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Tested-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Lennart Poettering
2011-09-27 18:04:06 +01:00
committed by Keith Packard
parent 77743f877d
commit fad04dd970
3 changed files with 19 additions and 0 deletions

View File

@@ -399,6 +399,12 @@
/* Use libudev for input hotplug */
#undef CONFIG_UDEV
/* Use udev_monitor_filter_add_match_tag() */
#undef HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG
/* Use udev_enumerate_add_match_tag() */
#undef HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG
/* Use D-Bus for input hotplug */
#undef CONFIG_NEED_DBUS