Commit 62090669 authored by antirez's avatar antirez
Browse files

Fix non-linux builds error introduced with THP checks.

parent 8a75ec0f
...@@ -73,6 +73,7 @@ int THPIsEnabled(void) { ...@@ -73,6 +73,7 @@ int THPIsEnabled(void) {
fclose(fp); fclose(fp);
return (strstr(buf,"[never]") == NULL) ? 1 : 0; return (strstr(buf,"[never]") == NULL) ? 1 : 0;
} }
#endif
/* Report the amount of AnonHugePages in smap, in bytes. If the return /* 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 * value of the function is non-zero, the process is being targeted by
...@@ -80,7 +81,6 @@ int THPIsEnabled(void) { ...@@ -80,7 +81,6 @@ int THPIsEnabled(void) {
int THPGetAnonHugePagesSize(void) { int THPGetAnonHugePagesSize(void) {
return zmalloc_get_smap_bytes_by_field("AnonHugePages:"); return zmalloc_get_smap_bytes_by_field("AnonHugePages:");
} }
#endif
/* ---------------------------- Latency API --------------------------------- */ /* ---------------------------- Latency API --------------------------------- */
......
...@@ -356,7 +356,7 @@ size_t zmalloc_get_smap_bytes_by_field(char *field) { ...@@ -356,7 +356,7 @@ size_t zmalloc_get_smap_bytes_by_field(char *field) {
} }
#else #else
size_t zmalloc_get_smap_bytes_by_field(char *field) { size_t zmalloc_get_smap_bytes_by_field(char *field) {
REDIS_NOTUSED(field); ((void) field);
return 0; return 0;
} }
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment