Merge "kill HAVE_MADVISE"
This commit is contained in:
commit
81906d4b0c
1 changed files with 8 additions and 4 deletions
|
|
@ -194,9 +194,9 @@ try_again:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Provide guidance to the system.
|
// Provide guidance to the system.
|
||||||
|
#if !defined(_WIN32)
|
||||||
int FileMap::advise(MapAdvice advice)
|
int FileMap::advise(MapAdvice advice)
|
||||||
{
|
{
|
||||||
#if !defined(_WIN32)
|
|
||||||
int cc, sysAdvice;
|
int cc, sysAdvice;
|
||||||
|
|
||||||
switch (advice) {
|
switch (advice) {
|
||||||
|
|
@ -214,7 +214,11 @@ int FileMap::advise(MapAdvice advice)
|
||||||
if (cc != 0)
|
if (cc != 0)
|
||||||
ALOGW("madvise(%d) failed: %s\n", sysAdvice, strerror(errno));
|
ALOGW("madvise(%d) failed: %s\n", sysAdvice, strerror(errno));
|
||||||
return cc;
|
return cc;
|
||||||
#else
|
|
||||||
return -1;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
int FileMap::advise(MapAdvice /* advice */)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue