Skip to content

Instantly share code, notes, and snippets.

@xavery
Created November 1, 2021 00:06
Show Gist options
  • Save xavery/e4627f47f35585149ac6f5a54e257fca to your computer and use it in GitHub Desktop.
Save xavery/e4627f47f35585149ac6f5a54e257fca to your computer and use it in GitHub Desktop.
Small code changes needed to compile Qt 5.6.3 on current-ish Linux and newer GCCs
diff -pur qt-everywhere-opensource-src-5.6.3/qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp qt-everywhere-opensource-src-5.6.3_built/qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
--- qt-everywhere-opensource-src-5.6.3/qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp 2017-09-06 14:13:54.000000000 +0200
+++ qt-everywhere-opensource-src-5.6.3_built/qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp 2021-10-31 19:15:07.120340205 +0100
@@ -698,14 +698,6 @@ void QXcbConnection::xi2ProcessTouch(voi
" Minimum libXi version required is 1.7.4."
" Expect issues with touch behavior.");
}
-#elif LIBXI_MAJOR == 1 && (LIBXI_MINOR < 7 || (LIBXI_MINOR == 7 && LIBXI_PATCH < 4))
- static bool allowTouchWarningShown = false;
- if (!allowTouchWarningShown) {
- allowTouchWarningShown = true;
- qWarning("Skipping XIAllowTouchEvents() due to not having libXi >= 1.7.4."
- " libXi version at build time was %d.%d.%d."
- " Expect issues with touch behavior.", LIBXI_MAJOR, LIBXI_MINOR, LIBXI_PATCH);
- }
#else
XIAllowTouchEvents(static_cast<Display *>(m_xlib_display), xiDeviceEvent->deviceid,
xiDeviceEvent->detail, xiDeviceEvent->event, XIAcceptTouch);
diff -pur qt-everywhere-opensource-src-5.6.3/qtimageformats/src/plugins/imageformats/jp2/qjp2handler.cpp qt-everywhere-opensource-src-5.6.3_built/qtimageformats/src/plugins/imageformats/jp2/qjp2handler.cpp
--- qt-everywhere-opensource-src-5.6.3/qtimageformats/src/plugins/imageformats/jp2/qjp2handler.cpp 2017-09-06 14:15:20.000000000 +0200
+++ qt-everywhere-opensource-src-5.6.3_built/qtimageformats/src/plugins/imageformats/jp2/qjp2handler.cpp 2021-10-31 19:26:18.437026289 +0100
@@ -40,6 +40,9 @@
#include <jasper/jasper.h>
+#include <cmath>
+using std::pow;
+
QT_BEGIN_NAMESPACE
class QJp2HandlerPrivate
diff -pur qt-everywhere-opensource-src-5.6.3/qtserialbus/src/plugins/canbus/socketcan/socketcanbackend.cpp qt-everywhere-opensource-src-5.6.3_built/qtserialbus/src/plugins/canbus/socketcan/socketcanbackend.cpp
--- qt-everywhere-opensource-src-5.6.3/qtserialbus/src/plugins/canbus/socketcan/socketcanbackend.cpp 2017-09-06 14:16:43.000000000 +0200
+++ qt-everywhere-opensource-src-5.6.3_built/qtserialbus/src/plugins/canbus/socketcan/socketcanbackend.cpp 2021-10-31 19:29:49.883699073 +0100
@@ -42,6 +42,7 @@
#include <linux/can/error.h>
#include <linux/can/raw.h>
+#include <linux/sockios.h>
#include <errno.h>
#include <unistd.h>
#include <net/if.h>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment