1 diff --git a/src/serialport/qtudev_p.h b/src/serialport/qtudev_p.h
2 index af2dab2..8e17f64 100644
3 --- a/src/serialport/qtudev_p.h
4 +++ b/src/serialport/qtudev_p.h
5 @@ -111,9 +111,17 @@ inline QFunctionPointer resolveSymbol(QLibrary *udevLibrary, const char *symbolN
6 inline bool resolveSymbols(QLibrary *udevLibrary)
8 if (!udevLibrary->isLoaded()) {
9 +#ifdef NIXPKGS_LIBUDEV
10 + udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 1);
12 udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1);
14 if (!udevLibrary->load()) {
15 +#ifdef NIXPKGS_LIBUDEV
16 + udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 0);
18 udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0);
20 if (!udevLibrary->load()) {
21 qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0);