From e24bc153b343ed417b8c8bfbc08daf78b4036950 Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Tue, 1 Dec 2009 14:07:22 +0100 Subject: [PATCH] Fix building without X11 --- src/conky.c | 2 ++ src/core.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/conky.c b/src/conky.c index f2dc9cb3..afe3da0a 100644 --- a/src/conky.c +++ b/src/conky.c @@ -754,8 +754,10 @@ void generate_text_internal(char *p, int p_max_size, struct text_object root) new_bar(obj, p, p_max_size, (*obj->callbacks.barval)(obj)); } else if (obj->callbacks.gaugeval) { new_gauge(obj, p, p_max_size, (*obj->callbacks.gaugeval)(obj)); +#ifdef X11 } else if (obj->callbacks.graphval) { new_graph(obj, p, p_max_size, (*obj->callbacks.graphval)(obj)); +#endif /* X11 */ } else if (obj->callbacks.percentage) { percent_print(p, p_max_size, (*obj->callbacks.percentage)(obj)); } diff --git a/src/core.c b/src/core.c index 8842e4ce..172e4568 100644 --- a/src/core.c +++ b/src/core.c @@ -634,9 +634,11 @@ struct text_object *construct_text_object(const char *s, const char *arg, long END OBJ(fs_used, &update_fs_stats) init_fs(obj, arg); obj->callbacks.print = &print_fs_used; +#ifdef X11 END OBJ(hr, 0) obj->data.l = arg ? atoi(arg) : 1; obj->callbacks.print = &new_hr; +#endif /* X11 */ END OBJ(nameserver, &update_dns_data) parse_nameserver_arg(obj, arg); obj->callbacks.print = &print_nameserver;