wiki:Linux-qt3-gcc47

To build qt3-3.3.8b under Linux with gcc compiler versions > 4.6 two files need to be patched:

diff -Naur qt3.orig/qt3-gcc46-includes.diff qt3/qt3-gcc46-includes.diff
--- qt3.orig/qt3-gcc46-includes.diff    1970-01-01 08:00:00.000000000 +0800
+++ qt3/qt3-gcc46-includes.diff 2012-05-07 12:23:13.783892875 +0800
@@ -0,0 +1,20 @@
+--- src/tools/qvaluelist.h     2008-01-15 19:09:13.000000000 +0000
++++ src/tools/qvaluelist.h     2011-01-27 10:29:39.559757983 +0000
+@@ -50,6 +50,7 @@
+ #ifndef QT_NO_STL
+ #include <iterator>
+ #include <list>
++#include <cstddef>
+ #endif
+ 
+ //#define QT_CHECK_VALUELIST_RANGE
+--- src/tools/qmap.h   2008-01-15 19:09:13.000000000 +0000
++++ src/tools/qmap.h   2011-01-27 10:30:12.087757984 +0000
+@@ -52,6 +52,7 @@
+ #ifndef QT_NO_STL
+ #include <iterator>
+ #include <map>
++#include <cstddef>
+ #endif
+ 
+ //#define QT_CHECK_MAP_RANGE
diff -Naur qt3.orig/qt3.SlackBuild qt3/qt3.SlackBuild
--- qt3.orig/qt3.SlackBuild     2011-12-12 02:46:39.000000000 +0800
+++ qt3/qt3.SlackBuild  2012-05-07 12:39:25.034857436 +0800
@@ -88,6 +88,9 @@
 # Build with libpng 1.4:
 patch -lp0 < $CWD/qt3-libpng14.diff

+# Fix missing #include for ptrdiff_t, needed with GCC >= 4.6
+patch -lp0 < $CWD/qt3-gcc46-includes.diff
+
 # Make sure ownerships and permissions are sane:
 chown -R root:root .
 find . \
Last modified 6 years ago Last modified on Jan 25, 2013 3:58:55 AM