summaryrefslogtreecommitdiff
path: root/packages/uicmoc/uicmoc-native-2.3.10/kernel-asm-page.patch
diff options
context:
space:
mode:
authorMichael Krelin <hacker@klever.net>2007-07-03 23:06:52 +0000
committerMichael Krelin <hacker@klever.net>2007-07-03 23:06:52 +0000
commit0656303da8128a1ff55fe8e424d9b8592c92b5d5 (patch)
tree1c72d3fa89f629e91762efd83519dceaa72379a3 /packages/uicmoc/uicmoc-native-2.3.10/kernel-asm-page.patch
parent5103645699eb1d07d721e457d65a1c6600429e95 (diff)
uicmoc-native 2.3.10: an attempt to fix build against recent kernel, bug #2564
Diffstat (limited to 'packages/uicmoc/uicmoc-native-2.3.10/kernel-asm-page.patch')
-rw-r--r--packages/uicmoc/uicmoc-native-2.3.10/kernel-asm-page.patch20
1 files changed, 20 insertions, 0 deletions
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
index 0000000000..bad2d95967
--- /dev/null
+++ b/packages/uicmoc/uicmoc-native-2.3.10/kernel-asm-page.patch
@@ -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
+
+