summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/serialport/qserialportinfo_unix.cpp7
-rw-r--r--src/serialport/qtudev_p.h2
2 files changed, 2 insertions, 7 deletions
diff --git a/src/serialport/qserialportinfo_unix.cpp b/src/serialport/qserialportinfo_unix.cpp
index 9ff4431..0405a41 100644
--- a/src/serialport/qserialportinfo_unix.cpp
+++ b/src/serialport/qserialportinfo_unix.cpp
@@ -360,12 +360,7 @@ QList<QSerialPortInfo> availablePortsByUdev()
QList<QSerialPortInfo> QSerialPortInfo::availablePorts()
{
- QList<QSerialPortInfo> serialPortInfoList;
- // TODO: Remove this condition once the udev runtime symbol resolution crash
- // is fixed for Qt 4.
-#if defined(LINK_LIBUDEV) || (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
- serialPortInfoList = availablePortsByUdev();
-#endif
+ QList<QSerialPortInfo> serialPortInfoList = availablePortsByUdev();
#ifdef Q_OS_LINUX
if (serialPortInfoList.isEmpty())
diff --git a/src/serialport/qtudev_p.h b/src/serialport/qtudev_p.h
index 09940ab..bd9e74d 100644
--- a/src/serialport/qtudev_p.h
+++ b/src/serialport/qtudev_p.h
@@ -65,7 +65,7 @@ extern "C"
#define GENERATE_SYMBOL_VARIABLE(returnType, symbolName, ...) \
typedef returnType (*fp_##symbolName)(__VA_ARGS__); \
- fp_##symbolName symbolName;
+ static fp_##symbolName symbolName;
#define RESOLVE_SYMBOL(symbolName) \
symbolName = (fp_##symbolName)resolveSymbol(udevLibrary, #symbolName); \