1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-16 20:55:20 +03:00
aports/testing/qt-creator/fix-malloc-trim.patch
2022-11-26 01:28:56 +01:00

13 lines
558 B
Diff

diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp
index 9c63e36e..85994c37 100644
--- a/src/plugins/coreplugin/mainwindow.cpp
+++ b/src/plugins/coreplugin/mainwindow.cpp
@@ -215,7 +215,7 @@ MainWindow::MainWindow()
m_trimTimer.setSingleShot(true);
m_trimTimer.setInterval(60000);
// glibc may not actually free memory in free().
-#ifdef Q_OS_LINUX
+#if defined(Q_OS_LINUX) && defined(__GLIBC__)
connect(&m_trimTimer, &QTimer::timeout, this, [] { malloc_trim(0); });
#endif
}