2017-10-24 12:39:54 +01:00
|
|
|
diff --git a/src/serialport/qtudev_p.h b/src/serialport/qtudev_p.h
|
|
|
|
index af2dab2..8e17f64 100644
|
|
|
|
--- a/src/serialport/qtudev_p.h
|
|
|
|
+++ b/src/serialport/qtudev_p.h
|
|
|
|
@@ -111,9 +111,17 @@ inline QFunctionPointer resolveSymbol(QLibrary *udevLibrary, const char *symbolN
|
2017-05-23 17:09:04 +01:00
|
|
|
inline bool resolveSymbols(QLibrary *udevLibrary)
|
|
|
|
{
|
|
|
|
if (!udevLibrary->isLoaded()) {
|
|
|
|
+#ifdef NIXPKGS_LIBUDEV
|
|
|
|
+ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 1);
|
|
|
|
+#else
|
|
|
|
udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1);
|
|
|
|
+#endif
|
|
|
|
if (!udevLibrary->load()) {
|
|
|
|
+#ifdef NIXPKGS_LIBUDEV
|
|
|
|
+ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 0);
|
|
|
|
+#else
|
|
|
|
udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0);
|
|
|
|
+#endif
|
|
|
|
if (!udevLibrary->load()) {
|
|
|
|
qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0);
|
|
|
|
return false;
|