summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eclass/udev.eclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/eclass/udev.eclass b/eclass/udev.eclass
index 96c723317c96..b7c6461dd8ff 100644
--- a/eclass/udev.eclass
+++ b/eclass/udev.eclass
@@ -44,7 +44,13 @@ DEPEND="virtual/pkgconfig"
# @INTERNAL
# @DESCRIPTION:
# Get unprefixed udevdir.
-_udev_get_udevdir() { echo /lib/udev; }
+_udev_get_udevdir() {
+ if $($(tc-getPKG_CONFIG) --exists udev); then
+ echo "$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
+ else
+ echo /lib/udev
+ fi
+}
# @FUNCTION: udev_get_udevdir
# @DESCRIPTION: