All pastes #1658925 Raw Edit

Anonymous

public text v1 · immutable
#1658925 ·published 2009-11-06 00:03 UTC
rendered paste body
From 234ea118c1e1baf7b25066ce075f5c2650eae05f Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Fri, 6 Nov 2009 01:01:47 +0100
Subject: [PATCH] qte-mt: apply workaround for missing asm/page.h header with recent
 kernels

---
 .../qte/qte-2.3.10/fix-qte-asm-include-oe.patch    |   27 ++++++++++++++++++++
 recipes/qte/qte-common_2.3.10.inc                  |    1 +
 2 files changed, 28 insertions(+), 0 deletions(-)
 create mode 100644 recipes/qte/qte-2.3.10/fix-qte-asm-include-oe.patch

diff --git a/recipes/qte/qte-2.3.10/fix-qte-asm-include-oe.patch b/recipes/qte/qte-2.3.10/fix-qte-asm-include-oe.patch
new file mode 100644
index 0000000..8818d46
--- /dev/null
+++ b/recipes/qte/qte-2.3.10/fix-qte-asm-include-oe.patch
@@ -0,0 +1,27 @@
+--- a/src/kernel/qpixmapcache.cpp	2009-11-06 00:25:45.000000000 +0100
++++ a/src/kernel/qpixmapcache.cpp.new	2009-11-06 00:42:17.000000000 +0100
+@@ -119,17 +119,17 @@
+ #include <time.h>
+ #include <stdio.h>
+ #include <signal.h>
++#include <unistd.h>
+ 
+ #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)+getpagesize()-1)&~(getpagesize()-1))
+-# endif
++# define PAGE_SIZE		getpagesize()
++# define PAGE_MASK		(~(PAGE_SIZE-1))
++# define PAGE_ALIGN(addr)	(((addr)+PAGE_SIZE-1)&PAGE_MASK)
++# endif // PAGE_ALIGN
++
+ #endif // THROW_AWAY_UNUSED_PAGES 
+ 
+ 
diff --git a/recipes/qte/qte-common_2.3.10.inc b/recipes/qte/qte-common_2.3.10.inc
index f24a265..e5456c9 100644
--- a/recipes/qte/qte-common_2.3.10.inc
+++ b/recipes/qte/qte-common_2.3.10.inc
@@ -48,6 +48,7 @@ SRC_URI = "ftp://ftp.trolltech.com/pub/qt/source/qt-embedded-${PV}-free.tar.gz;m
 	   file://kernel-asm-page.patch;patch=1 \
 	   file://remove-unused-kbdhandler.patch;patch=1 \
 	   file://disable-dup-rotation.patch;patch=1 \
+	   file://fix-qte-asm-include-oe.patch;patch=1 \
 	   file://sharp_char.h \
 	   file://switches.h "
 
-- 
1.6.4.4