#ifdef CYRUS_SASL
# include <sasl/sasl.h>
# include <sasl/saslutil.h>
+# if SASL_VERSION_FULL < 0x020125
+ /* Cyrus SASL 2.1.25 introduced the sasl_callback_ft prototype,
+ which has an explicit void parameter list, according to best
+ practice. So we need to cast to avoid compile warnings.
+ Provide this prototype for earlier versions. */
+ typedef int (*sasl_callback_ft)();
+# endif /* SASL_VERSION_FULL < 0x020125 */
#endif /* CYRUS_SASL */
#include <h/popsbr.h>
};
static sasl_callback_t callbacks[] = {
- { SASL_CB_USER, sasl_get_user, NULL },
+ { SASL_CB_USER, (sasl_callback_ft) sasl_get_user, NULL },
#define POP_SASL_CB_N_USER 0
- { SASL_CB_PASS, sasl_get_pass, NULL },
+ { SASL_CB_PASS, (sasl_callback_ft) sasl_get_pass, NULL },
#define POP_SASL_CB_N_PASS 1
{ SASL_CB_LOG, NULL, NULL },
{ SASL_CB_LIST_END, NULL, NULL },
char *pass = NULL;
int len;
+ NMH_UNUSED (conn);
+
if (! psecret || id != SASL_CB_PASS)
return SASL_BADPARAM;
{
int fd1, fd2;
char buffer[BUFSIZ];
+#ifndef CYRUS_SASL
+ NMH_UNUSED (sasl);
+ NMH_UNUSED (mech);
+#endif /* ! CYRUS_SASL */
if (proxy && *proxy) {
int pid;
sasl_fgetc(FILE *f)
{
static unsigned char *buffer = NULL, *ptr;
- static int size = 0;
+ static unsigned int size = 0;
static int cnt = 0;
unsigned int retbufsize = 0;
int cc, result;