From f9f501287ffa6a2c69a9033536d3b6f14db34204 Mon Sep 17 00:00:00 2001 From: Trond Norbye Date: Mon, 8 Mar 2010 19:31:33 +0100 Subject: [PATCH] Fix build for non-sasl-enabled builds --- clients/utilities.c | 6 +++--- tests/mem_functions.c | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/clients/utilities.c b/clients/utilities.c index ef1e60f3..e21df20d 100644 --- a/clients/utilities.c +++ b/clients/utilities.c @@ -124,10 +124,10 @@ void process_hash_option(memcached_st *memc, char *opt_hash) } } +#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT static char *username; static char *passwd; -#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT static int get_username(void *context, int id, const char **result, unsigned int *len) { @@ -201,7 +201,7 @@ bool initialize_sasl(memcached_st *memc, char *user, char *password) #else (void)memc; (void)user; - (void)passwd; + (void)password; #endif return true; @@ -209,7 +209,7 @@ bool initialize_sasl(memcached_st *memc, char *user, char *password) void shutdown_sasl(void) { -#if LIBMEMCACHED_WITH_SASL_SUPPORT +#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT if (username != NULL || passwd != NULL) sasl_done(); #endif diff --git a/tests/mem_functions.c b/tests/mem_functions.c index 263119d6..bb288507 100644 --- a/tests/mem_functions.c +++ b/tests/mem_functions.c @@ -5537,6 +5537,7 @@ static test_return_t regression_bug_490486(memcached_st *memc) */ static test_return_t sasl_auth_test(memcached_st *memc) { +#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT memcached_return_t rc; rc= memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0); @@ -5558,6 +5559,10 @@ static test_return_t sasl_auth_test(memcached_st *memc) memcached_quit(memc); return TEST_SUCCESS; +#else + (void)memc; + return TEST_FAILURE; +#endif } /* Clean the server before beginning testing */ @@ -5719,12 +5724,10 @@ test_st regression_tests[]= { {0, 0, (test_callback_fn)0} }; -#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT test_st sasl_auth_tests[]= { {"sasl_auth", 1, (test_callback_fn)sasl_auth_test }, {0, 0, (test_callback_fn)0} }; -#endif test_st ketama_compatibility[]= { {"libmemcached", 1, (test_callback_fn)ketama_compatibility_libmemcached }, -- 2.30.2