uicmoc-native 2.3.10: an attempt to fix build against recent kernel, bug #2564
authorMichael Krelin <hacker@klever.net>
Tue, 3 Jul 2007 23:06:52 +0000 (23:06 +0000)
committerMichael Krelin <hacker@klever.net>
Tue, 3 Jul 2007 23:06:52 +0000 (23:06 +0000)
packages/uicmoc/uicmoc-native-2.3.10/kernel-asm-page.patch [new file with mode: 0644]
packages/uicmoc/uicmoc-native_2.3.10.bb

diff --git a/packages/uicmoc/uicmoc-native-2.3.10/kernel-asm-page.patch b/packages/uicmoc/uicmoc-native-2.3.10/kernel-asm-page.patch
new file mode 100644 (file)
index 0000000..bad2d95
--- /dev/null
@@ -0,0 +1,20 @@
+diff --git a/src/kernel/qpixmapcache.cpp b/src/kernel/qpixmapcache.cpp
+index c2e7d9b..8d39585 100644
+--- a/src/kernel/qpixmapcache.cpp
++++ b/src/kernel/qpixmapcache.cpp
+@@ -123,9 +123,13 @@ void cleanup_pixmap_cache();
+ #ifdef THROW_AWAY_UNUSED_PAGES
+ # include <sys/mman.h> // madvise
+ # include <asm/page.h> // PAGE_SIZE,PAGE_MASK,PAGE_ALIGN
++# include <unistd.h>  // getpagesize()
++# if (!defined(PAGE_ALIGN)) && defined(PAGE_SIZE) && defined(PAGE_MASK)
++#  define PAGE_ALIGN(addr)    (((addr)+PAGE_SIZE-1)&PAGE_MASK)
++# endif
+ # ifndef PAGE_ALIGN
+-# define PAGE_ALIGN(addr)     (((addr)+PAGE_SIZE-1)&PAGE_MASK)
+-# endif // PAGE_ALIGN
++#  define PAGE_ALIGN(addr)      (((addr)+getpagesize()-1)&~(getpagesize()-1))
++# endif
+ #endif // THROW_AWAY_UNUSED_PAGES 
index 90c9b43..cda2335 100644 (file)
@@ -3,14 +3,15 @@ HOMEPAGE = "http://www.trolltech.com"
 SECTION = "devel"
 PRIORITY = "optional"
 LICENSE = "GPL QPL"
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "ftp://ftp.trolltech.com/pub/qt/source/qt-embedded-${PV}-free.tar.gz \
            file://fix-makefile.patch;patch=1 \
            file://gcc3_4.patch;patch=1" \
            file://gcc4.patch;patch=1 \
            file://gcc4_1.patch;patch=1 \
-           file://64bit-cleanup.patch;patch=1"
+           file://64bit-cleanup.patch;patch=1 \
+          file://kernel-asm-page.patch;patch=1"
 S = "${WORKDIR}/qt-${PV}"
 
 inherit native qmake-base