From d4bc07b1f1cca4e5fd207f16785ec59e483ea42d Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 18 Nov 2009 13:15:34 +0100 Subject: [PATCH] fix for compiling on freebsd --- src/conky.c | 2 ++ src/core.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/conky.c b/src/conky.c index 3fcd50f9..8a46f04b 100644 --- a/src/conky.c +++ b/src/conky.c @@ -3306,10 +3306,12 @@ char load_config_file(const char *f) CONF("no_buffers") { no_buffers = string_to_bool(value); } +#ifdef __linux__ CONF("top_name_width") { if (set_top_name_width(value)) CONF_ERR; } +#endif /* __linux__ */ CONF("top_cpu_separate") { cpu_separate = string_to_bool(value); } diff --git a/src/core.c b/src/core.c index 857ad4a8..89c1b2c9 100644 --- a/src/core.c +++ b/src/core.c @@ -1714,7 +1714,7 @@ int extract_variable_text_internal(struct text_object *retval, const char *const } /* copy variable to buffer */ - len = (p - s > text_buffer_size-1) ? text_buffer_size-1 : (p - s); + len = (p - s > (int)text_buffer_size-1) ? (int)text_buffer_size-1 : (p - s); strncpy(buf, s, len); buf[len] = '\0';