aboutsummaryrefslogtreecommitdiffstats
path: root/testing/kdelibs/kdelibs-madvise.patch
blob: 3f3b42569fe11138c260ae2fe5594e9ce4d1794b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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();