2014-06-10 11:42:48 +01:00
|
|
|
diff --git a/src/loader/loader.c b/src/loader/loader.c
|
2015-07-18 02:33:19 +01:00
|
|
|
index 4fdf3c2..0cd62b5 100644
|
2014-06-10 11:42:48 +01:00
|
|
|
--- a/src/loader/loader.c
|
|
|
|
+++ b/src/loader/loader.c
|
2015-07-18 02:33:19 +01:00
|
|
|
@@ -112,7 +112,6 @@ static void *udev_handle = NULL;
|
|
|
|
static void *
|
2014-06-10 11:42:48 +01:00
|
|
|
udev_dlopen_handle(void)
|
|
|
|
{
|
2015-07-18 02:33:19 +01:00
|
|
|
- char name[80];
|
|
|
|
unsigned flags = RTLD_NOLOAD | RTLD_LOCAL | RTLD_LAZY;
|
|
|
|
int version;
|
2014-06-10 11:42:48 +01:00
|
|
|
|
2015-07-18 02:33:19 +01:00
|
|
|
@@ -125,12 +124,9 @@ udev_dlopen_handle(void)
|
|
|
|
|
|
|
|
/* First try opening an already linked libudev, then try loading one */
|
|
|
|
do {
|
|
|
|
- for (version = 1; version >= 0; version--) {
|
|
|
|
- snprintf(name, sizeof(name), "libudev.so.%d", version);
|
|
|
|
- udev_handle = dlopen(name, flags);
|
|
|
|
- if (udev_handle)
|
|
|
|
- return udev_handle;
|
|
|
|
- }
|
|
|
|
+ udev_handle = dlopen("@udev@/lib/libudev.so", flags);
|
|
|
|
+ if (udev_handle)
|
|
|
|
+ return udev_handle;
|
|
|
|
|
|
|
|
if ((flags & RTLD_NOLOAD) == 0)
|
|
|
|
break;
|