summaryrefslogtreecommitdiffstats
path: root/libutils/FileMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libutils/FileMap.cpp')
-rw-r--r--libutils/FileMap.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/libutils/FileMap.cpp b/libutils/FileMap.cpp
index 6d92f74..f49b4f9 100644
--- a/libutils/FileMap.cpp
+++ b/libutils/FileMap.cpp
@@ -194,9 +194,9 @@ try_again:
}
// Provide guidance to the system.
+#if !defined(_WIN32)
int FileMap::advise(MapAdvice advice)
{
-#if HAVE_MADVISE
int cc, sysAdvice;
switch (advice) {
@@ -214,7 +214,11 @@ int FileMap::advise(MapAdvice advice)
if (cc != 0)
ALOGW("madvise(%d) failed: %s\n", sysAdvice, strerror(errno));
return cc;
+}
+
#else
+int FileMap::advise(MapAdvice /* advice */)
+{
return -1;
-#endif // HAVE_MADVISE
}
+#endif