[collectd] [PATCH] processes.c,
utils_dns.c: Fix compile errors on GNU/kFreeBSD.
Sebastian Harl
sh<span style="display: none;">.trailing-username</span>(a)<span style="display: none;">leading-domain.</span>tokkee.org
Mon Feb 5 22:42:26 CET 2007
Signed-off-by: Sebastian Harl <sh.trailing-username(a)leading-domain.tokkee.org>
---
src/processes.c | 8 +++++++-
src/utils_dns.c | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/processes.c b/src/processes.c
index c8f3016..6898445 100644
--- a/src/processes.c
+++ b/src/processes.c
@@ -144,12 +144,14 @@ static char *ps_pagefaults_ds_def[] =
};
static int ps_pagefaults_ds_num = 2;
+#if HAVE_THREAD_INFO | KERNEL_LINUX
static char *config_keys[] =
{
"Process",
NULL
};
static int config_keys_num = 1;
+#endif
typedef struct procstat_entry_s
{
@@ -192,7 +194,9 @@ typedef struct procstat
struct procstat_entry_s *instances;
} procstat_t;
+#if HAVE_THREAD_INFO | KERNEL_LINUX
static procstat_t *list_head_g = NULL;
+#endif
#if HAVE_THREAD_INFO
static mach_port_t port_host_self;
@@ -403,7 +407,6 @@ static void ps_list_reset (void)
} /* while (pse != NULL) */
} /* for (ps = list_head_g; ps != NULL; ps = ps->next) */
}
-#endif /* HAVE_THREAD_INFO | KERNEL_LINUX */
static int ps_config (char *key, char *value)
{
@@ -418,6 +421,7 @@ static int ps_config (char *key, char *value)
return (0);
}
+#endif /* HAVE_THREAD_INFO | KERNEL_LINUX */
static void ps_init (void)
{
@@ -1135,7 +1139,9 @@ void module_register (void)
plugin_register ("ps_cputime", NULL, NULL, ps_cputime_write);
plugin_register ("ps_count", NULL, NULL, ps_count_write);
plugin_register ("ps_pagefaults", NULL, NULL, ps_pagefaults_write);
+#if HAVE_THREAD_INFO | KERNEL_LINUX
cf_register (MODULE_NAME, ps_config, config_keys, config_keys_num);
+#endif
}
#undef BUFSIZE
diff --git a/src/utils_dns.c b/src/utils_dns.c
index e9aec38..89c0320 100644
--- a/src/utils_dns.c
+++ b/src/utils_dns.c
@@ -110,7 +110,7 @@
# define PPP_CONTROL_VAL 0x03 /* The control byte value */
#endif
-#ifdef __linux__
+#ifndef __FAVOR_BSD
#define uh_sport source
#define uh_dport dest
#endif
--
1.4.4.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20070205/8da97d7e/attachment.pgp
More information about the collectd
mailing list