Commit fd8c9a94 authored by Hallvard Furuseth's avatar Hallvard Furuseth Committed by Quanah Gibson-Mount
Browse files

Fallback typedef for slap_sasl_cb_ft

parent 03432c5c
......@@ -46,6 +46,12 @@
#define SASL_VERSION_FULL ((SASL_VERSION_MAJOR << 16) |\
(SASL_VERSION_MINOR << 8) | SASL_VERSION_STEP)
#if SASL_VERSION_MINOR >= 0x020119 /* 2.1.25 */
typedef sasl_callback_ft slap_sasl_cb_ft;
#else
typedef int (*slap_sasl_cb_ft)();
#endif
static sasl_security_properties_t sasl_secprops;
#elif defined( SLAP_BUILTIN_SASL )
/*
......@@ -1112,8 +1118,8 @@ int slap_sasl_init( void )
#ifdef HAVE_CYRUS_SASL
int rc;
static sasl_callback_t server_callbacks[] = {
{ SASL_CB_LOG, (sasl_callback_ft)&slap_sasl_log, NULL },
{ SASL_CB_GETOPT, (sasl_callback_ft)&slap_sasl_getopt, NULL },
{ SASL_CB_LOG, (slap_sasl_cb_ft)&slap_sasl_log, NULL },
{ SASL_CB_GETOPT, (slap_sasl_cb_ft)&slap_sasl_getopt, NULL },
{ SASL_CB_LIST_END, NULL, NULL }
};
#endif
......@@ -1257,15 +1263,15 @@ int slap_sasl_open( Connection *conn, int reopen )
conn->c_sasl_extra = session_callbacks;
session_callbacks[cb=0].id = SASL_CB_LOG;
session_callbacks[cb].proc = (sasl_callback_ft)&slap_sasl_log;
session_callbacks[cb].proc = (slap_sasl_cb_ft)&slap_sasl_log;
session_callbacks[cb++].context = conn;
session_callbacks[cb].id = SASL_CB_PROXY_POLICY;
session_callbacks[cb].proc = (sasl_callback_ft)&slap_sasl_authorize;
session_callbacks[cb].proc = (slap_sasl_cb_ft)&slap_sasl_authorize;
session_callbacks[cb++].context = conn;
session_callbacks[cb].id = SASL_CB_CANON_USER;
session_callbacks[cb].proc = (sasl_callback_ft)&slap_sasl_canonicalize;
session_callbacks[cb].proc = (slap_sasl_cb_ft)&slap_sasl_canonicalize;
session_callbacks[cb++].context = conn;
session_callbacks[cb].id = SASL_CB_LIST_END;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment