diff options
author | norly <ny-git@enpas.org> | 2014-05-28 21:11:11 +0200 |
---|---|---|
committer | norly <ny-git@enpas.org> | 2014-05-28 21:11:11 +0200 |
commit | e26711c0f1480208d8810780b10ba1a41dc01daf (patch) | |
tree | 83ed81b54594d6ffba0165c12d42a42ad228006f /src/status/memusage.c | |
parent | 53266a8bdc96e5313a64fa4aec34c4b0bb61bd47 (diff) |
Workaround for Linux 3.14
Diffstat (limited to 'src/status/memusage.c')
-rw-r--r-- | src/status/memusage.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/status/memusage.c b/src/status/memusage.c index 6e71514..15523de 100644 --- a/src/status/memusage.c +++ b/src/status/memusage.c @@ -1,5 +1,6 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include "common.h" #include "tools.h" @@ -33,6 +34,9 @@ void status_memusage(GlobalData *g) memfree = atoi(&stline[17]); stlen = getline(&stline, &stlen, stfile); + if (stlen > 13 && !memcmp(stline, "MemAvailable:", 13)) { + stlen = getline(&stline, &stlen, stfile); + } membuffers = atoi(&stline[17]); stlen = getline(&stline, &stlen, stfile); |