Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / qt-5 / 5.15 / qtserialport.patch
blobf25524e80bcfe8ca3ba93bd3562149043ab1aa97
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);
11 +#else
12 udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1);
13 +#endif
14 if (!udevLibrary->load()) {
15 +#ifdef NIXPKGS_LIBUDEV
16 + udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 0);
17 +#else
18 udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0);
19 +#endif
20 if (!udevLibrary->load()) {
21 qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0);
22 return false;