From 15c89fc606994be2192542a0dcf45a20f7aaae13 Mon Sep 17 00:00:00 2001 From: Thomas Porzelt Date: Sat, 31 Jul 2010 15:51:10 +0200 Subject: [PATCH] [core] Fix compilation on osx and freebsd+waf --- src/common/sys_memory.c | 2 +- src/common/wscript | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/common/sys_memory.c b/src/common/sys_memory.c index 3574c49..ec55ac9 100644 --- a/src/common/sys_memory.c +++ b/src/common/sys_memory.c @@ -80,7 +80,7 @@ gsize li_memory_usage(void) { if (KERN_SUCCESS != task_info(mach_task_self(), TASK_BASIC_INFO, (task_info_t) &tbinfo, &cnt)) return 0; - return binfo.resident_size; + return tbinfo.resident_size; } #elif defined(LIGHTY_OS_SOLARIS) diff --git a/src/common/wscript b/src/common/wscript index 34d597c..1bec16b 100644 --- a/src/common/wscript +++ b/src/common/wscript @@ -10,6 +10,8 @@ License and Copyright: see COPYING file import Options, sys, Utils def configure(conf): + if sys.platform.startswith('freebsd'): + conf.check(lib='kvm', uselib_store='kvm', mandatory=True) pass @@ -29,11 +31,15 @@ def build(bld): utils.c waitqueue.c ''' + if sys.platform.startswith('freebsd'): + libs = ['kvm'] + else: + libs = [] libcommon = bld.new_task_gen( features = 'cc cshlib', source = source, defines = ['HAVE_CONFIG_H=1'], - uselib = ['glib', 'gthread', 'gmodule', 'ev'], + uselib = ['glib', 'gthread', 'gmodule', 'ev'] + libs, includes = ['#/include/'], target = 'common')