From 8a77902f347b7a63d079de115b16a32e520465b4 Mon Sep 17 00:00:00 2001 From: Yu Qing Date: Wed, 27 Jan 2016 18:14:36 +0800 Subject: [PATCH] iOS test ok --- src/system_info.c | 1 + src/system_info.h | 2 +- src/tests/test_mblock.c | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/system_info.c b/src/system_info.c index b20b6e1..01ff7ec 100644 --- a/src/system_info.c +++ b/src/system_info.c @@ -491,6 +491,7 @@ int get_processes(struct fast_process_info **processes, int *count) size_t size; int bytes; int nproc; + int i; bool success; *count = 0; diff --git a/src/system_info.h b/src/system_info.h index 50bb305..41f2d81 100644 --- a/src/system_info.h +++ b/src/system_info.h @@ -47,7 +47,7 @@ extern "C" { char f_mntonname[MNAMELEN]; /* directory on which mounted */ } FastStatFS; -#ifdef OS_LINUX +#if defined(OS_LINUX) || defined(OS_FREEBSD) typedef struct fast_process_info { int field_count; //field count in /proc/$pid/stat int pid; diff --git a/src/tests/test_mblock.c b/src/tests/test_mblock.c index eba3534..b033516 100644 --- a/src/tests/test_mblock.c +++ b/src/tests/test_mblock.c @@ -90,7 +90,8 @@ int main(int argc, char *argv[]) printf("process count: %d\n", count); for (i=0; i