Fix non-linux builds error introduced with THP checks.

This commit is contained in:
antirez 2014-11-14 17:13:35 +01:00
parent 8a75ec0fca
commit 620906693e
2 changed files with 2 additions and 2 deletions

View File

@ -73,6 +73,7 @@ int THPIsEnabled(void) {
fclose(fp);
return (strstr(buf,"[never]") == NULL) ? 1 : 0;
}
#endif
/* Report the amount of AnonHugePages in smap, in bytes. If the return
* value of the function is non-zero, the process is being targeted by
@ -80,7 +81,6 @@ int THPIsEnabled(void) {
int THPGetAnonHugePagesSize(void) {
return zmalloc_get_smap_bytes_by_field("AnonHugePages:");
}
#endif
/* ---------------------------- Latency API --------------------------------- */

View File

@ -356,7 +356,7 @@ size_t zmalloc_get_smap_bytes_by_field(char *field) {
}
#else
size_t zmalloc_get_smap_bytes_by_field(char *field) {
REDIS_NOTUSED(field);
((void) field);
return 0;
}
#endif