aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/kdelibs/kdelibs-madvise.patch
diff options
context:
space:
mode:
Diffstat (limited to 'unmaintained/kdelibs/kdelibs-madvise.patch')
-rw-r--r--unmaintained/kdelibs/kdelibs-madvise.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/unmaintained/kdelibs/kdelibs-madvise.patch b/unmaintained/kdelibs/kdelibs-madvise.patch
new file mode 100644
index 0000000000..3f3b42569f
--- /dev/null
+++ b/unmaintained/kdelibs/kdelibs-madvise.patch
@@ -0,0 +1,22 @@
+--- kdelibs-4.6.3.orig/kdecore/sycoca/ksycoca.cpp
++++ kdelibs-4.6.3/kdecore/sycoca/ksycoca.cpp
+@@ -139,7 +139,7 @@
+ return false;
+ } else {
+ #ifdef HAVE_MADVISE
+- (void) posix_madvise((void*)sycoca_mmap, sycoca_size, POSIX_MADV_WILLNEED);
++ (void) madvise((void*)sycoca_mmap, sycoca_size, MADV_WILLNEED);
+ #endif // HAVE_MADVISE
+ return true;
+ }
+--- kdelibs-4.6.3.orig/kdeui/util/kpixmapcache.cpp
++++ kdelibs-4.6.3/kdeui/util/kpixmapcache.cpp
+@@ -443,7 +443,7 @@
+ }
+ info->indexHeader = reinterpret_cast<KPixmapCacheIndexHeader *>(indexMem);
+ #ifdef HAVE_MADVISE
+- posix_madvise(indexMem, info->size, POSIX_MADV_WILLNEED);
++ madvise(indexMem, info->size, MADV_WILLNEED);
+ #endif
+
+ info->file->close();