Source: timemon.app Version: 4.1-1 Severity: important Tags: patch User: [email protected] Usertag: kfreebsd
Hi Gürkan, TimeMon fails to build on kfreebsd*: Compiling file loadave.c ... loadave.c:136:28: warning: mach/mach_init.h: No such file or directory loadave.c:137:28: warning: mach/mach_host.h: No such file or directory loadave.c:138:29: warning: mach/mach_error.h: No such file or directory loadave.c:139:28: warning: mach/mach_port.h: No such file or directory loadave.c:140:29: warning: mach/mach_types.h: No such file or directory loadave.c: In function 'la_read': loadave.c:144: error: 'kern_return_t' undeclared (first use in this function) loadave.c:144: error: (Each undeclared identifier is reported only once loadave.c:144: error: for each function it appears in.) loadave.c:144: error: expected ';' before 'ret' loadave.c:145: error: 'host_cpu_load_info_data_t' undeclared (first use in this function) loadave.c:145: error: expected ';' before 'cpuStats' loadave.c:146: error: 'mach_msg_type_number_t' undeclared (first use in this function) loadave.c:146: error: expected ';' before 'count' loadave.c:147: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'timemon_port' loadave.c:147: error: 'timemon_port' undeclared (first use in this function) loadave.c:152: warning: implicit declaration of function 'mach_host_self' loadave.c:155: error: 'count' undeclared (first use in this function) loadave.c:155: error: 'HOST_CPU_LOAD_INFO_COUNT' undeclared (first use in this function) loadave.c:156: error: 'ret' undeclared (first use in this function) loadave.c:156: warning: implicit declaration of function 'host_statistics' loadave.c:156: error: 'HOST_CPU_LOAD_INFO' undeclared (first use in this function) loadave.c:156: error: 'host_info_t' undeclared (first use in this function) loadave.c:156: error: 'cpuStats' undeclared (first use in this function) loadave.c:158: error: 'CPU_STATE_IDLE' undeclared (first use in this function) loadave.c:158: error: 'CPU_STATE_USER' undeclared (first use in this function) loadave.c:159: error: 'CPU_STATE_NICE' undeclared (first use in this function) loadave.c:159: error: 'CPU_STATE_SYSTEM' undeclared (first use in this function) make[2]: *** [obj/loadave.c.o] Error 1 The attached trivial patch should fix it. Unfortunately I can't test it right now -- my GNU/kFreeBSD box has some hardware issues...
--- timemon.app-4.1.orig/loadave.c +++ timemon.app-4.1/loadave.c @@ -31,7 +31,7 @@ return LA_NOERR; } -#elif defined( __FreeBSD__ ) +#elif defined( __FreeBSD__ ) || defined( __FreeBSD_kernel__ ) #include <sys/types.h> #include <sys/errno.h>

