diff --git a/src/xsasl/xsasl_cyrus_client.c b/src/xsasl/xsasl_cyrus_client.c index 01dbb85..9b0b6b1 100644 --- a/src/xsasl/xsasl_cyrus_client.c +++ b/src/xsasl/xsasl_cyrus_client.c @@ -224,7 +224,6 @@ XSASL_CLIENT_IMPL *xsasl_cyrus_client_init(const char *unused_client_type, */ static sasl_callback_t callbacks[] = { {SASL_CB_LOG, (XSASL_CYRUS_CB) &xsasl_cyrus_log, 0}, - {SASL_CB_GETPATH, &xsasl_getconfpath, 0}, #ifdef SASL_CB_GETCONFPATH {SASL_CB_GETCONFPATH, &xsasl_getconfpath, 0}, #endif diff --git a/src/xsasl/xsasl_cyrus_common.h b/src/xsasl/xsasl_cyrus_common.h index 1bde619..6cc6517 100644 --- a/src/xsasl/xsasl_cyrus_common.h +++ b/src/xsasl/xsasl_cyrus_common.h @@ -16,13 +16,17 @@ */ #if defined(USE_SASL_AUTH) && defined(USE_CYRUS_SASL) +#include + #define NO_SASL_LANGLIST ((const char *) 0) #define NO_SASL_OUTLANG ((const char **) 0) #define xsasl_cyrus_strerror(status) \ sasl_errstring((status), NO_SASL_LANGLIST, NO_SASL_OUTLANG) extern int xsasl_cyrus_log(void *, int, const char *); extern int xsasl_cyrus_security_parse_opts(const char *); +#ifdef SASL_CB_GETCONFPATH extern int xsasl_getconfpath(void *, char **); +#endif #endif diff --git a/src/xsasl/xsasl_cyrus_log.c b/src/xsasl/xsasl_cyrus_log.c index bb5ad17..77db6ba 100644 --- a/src/xsasl/xsasl_cyrus_log.c +++ b/src/xsasl/xsasl_cyrus_log.c @@ -102,6 +102,7 @@ int xsasl_cyrus_log(void *unused_context, int priority, return (SASL_OK); } +#ifdef SASL_CB_GETCONFPATH int xsasl_getconfpath(void *unused_context, char **path) { #if SASL_VERSION_MAJOR >= 2 @@ -111,5 +112,6 @@ int xsasl_getconfpath(void *unused_context, char **path) #endif return (SASL_OK); } +#ifdef SASL_CB_GETCONFPATH #endif diff --git a/src/xsasl/xsasl_cyrus_server.c b/src/xsasl/xsasl_cyrus_server.c index 67f84d0..dc9e739 100644 --- a/src/xsasl/xsasl_cyrus_server.c +++ b/src/xsasl/xsasl_cyrus_server.c @@ -171,7 +171,6 @@ static const char *xsasl_cyrus_server_get_username(XSASL_SERVER *); static sasl_callback_t callbacks[] = { {SASL_CB_LOG, (XSASL_CYRUS_CB) &xsasl_cyrus_log, NO_CALLBACK_CONTEXT}, - {SASL_CB_GETPATH, &xsasl_getconfpath, 0}, #ifdef SASL_CB_GETCONFPATH {SASL_CB_GETCONFPATH, &xsasl_getconfpath, 0}, #endif