steveyen/moxi

compile error without libconflate

Opened this issue · 1 comments

Hi,

compile error:
moxi-memcached.o: In function process_stats_proxy_command': memcached.c:(.text+0x7fe3): undefined reference toproxy_stats_dump_timings'

I temporarily solved it by:

diff --git a/memcached.c b/memcached.c
index d967bee..c67f4c4 100644
--- a/memcached.c
+++ b/memcached.c
@@ -2972,7 +2972,9 @@ void process_stats_proxy_command(conn *c, token_t *tokens, const size_t ntokens)
}

 if (ntokens == 4 && strcmp(tokens[2].value, "timings") == 0) {

+#ifdef HAVE_CONFLATE_H
proxy_stats_dump_timings(&append_stats, c);
+#endif
} else {
bool do_all = (ntokens == 3 || strcmp(tokens[2].value, "all") == 0);
struct proxy_stats_cmd_info psci = {

lxnt commented

should also #ifdef out #include <agent.h> in memcached.c if libconflate is not installed.