From 6b94e330d7ef30cf71fd36004d27cfefa3dae526 Mon Sep 17 00:00:00 2001 From: ume Date: Sat, 1 Oct 2011 19:58:35 +0000 Subject: [PATCH] MFC r225906: Shut up warnings with Cyrus SASL 2.1.25. Approved by: re (kib) git-svn-id: svn://svn.freebsd.org/base/stable/9@225907 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- contrib/sendmail/src/main.c | 4 ++-- contrib/sendmail/src/sendmail.h | 5 +++++ contrib/sendmail/src/usersmtp.c | 10 +++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/contrib/sendmail/src/main.c b/contrib/sendmail/src/main.c index 4d2318fb4..e14ffa01c 100644 --- a/contrib/sendmail/src/main.c +++ b/contrib/sendmail/src/main.c @@ -109,8 +109,8 @@ GIDSET_T InitialGidSet[NGROUPS_MAX]; #if SASL static sasl_callback_t srvcallbacks[] = { - { SASL_CB_VERIFYFILE, &safesaslfile, NULL }, - { SASL_CB_PROXY_POLICY, &proxy_policy, NULL }, + { SASL_CB_VERIFYFILE, (sasl_callback_ft)&safesaslfile, NULL }, + { SASL_CB_PROXY_POLICY, (sasl_callback_ft)&proxy_policy, NULL }, { SASL_CB_LIST_END, NULL, NULL } }; #endif /* SASL */ diff --git a/contrib/sendmail/src/sendmail.h b/contrib/sendmail/src/sendmail.h index 39ba16cf0..ecb3fa381 100644 --- a/contrib/sendmail/src/sendmail.h +++ b/contrib/sendmail/src/sendmail.h @@ -133,10 +133,15 @@ SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.1089 2011/03/15 23:1 # if SASL == 2 || SASL >= 20000 # include +# include # include +# if SASL_VERSION_FULL < 0x020119 +typedef int (*sasl_callback_ft)(void); +# endif # else /* SASL == 2 || SASL >= 20000 */ # include # include +typedef int (*sasl_callback_ft)(void); # endif /* SASL == 2 || SASL >= 20000 */ # if defined(SASL_VERSION_MAJOR) && defined(SASL_VERSION_MINOR) && defined(SASL_VERSION_STEP) # define SASL_VERSION (SASL_VERSION_MAJOR * 10000) + (SASL_VERSION_MINOR * 100) + SASL_VERSION_STEP diff --git a/contrib/sendmail/src/usersmtp.c b/contrib/sendmail/src/usersmtp.c index 0de839e42..c5da51257 100644 --- a/contrib/sendmail/src/usersmtp.c +++ b/contrib/sendmail/src/usersmtp.c @@ -524,15 +524,15 @@ static int attemptauth __P((MAILER *, MCI *, ENVELOPE *, SASL_AI_T *)); static sasl_callback_t callbacks[] = { - { SASL_CB_GETREALM, &saslgetrealm, NULL }, + { SASL_CB_GETREALM, (sasl_callback_ft)&saslgetrealm, NULL }, #define CB_GETREALM_IDX 0 - { SASL_CB_PASS, &getsecret, NULL }, + { SASL_CB_PASS, (sasl_callback_ft)&getsecret, NULL }, #define CB_PASS_IDX 1 - { SASL_CB_USER, &getsimple, NULL }, + { SASL_CB_USER, (sasl_callback_ft)&getsimple, NULL }, #define CB_USER_IDX 2 - { SASL_CB_AUTHNAME, &getsimple, NULL }, + { SASL_CB_AUTHNAME, (sasl_callback_ft)&getsimple, NULL }, #define CB_AUTHNAME_IDX 3 - { SASL_CB_VERIFYFILE, &safesaslfile, NULL }, + { SASL_CB_VERIFYFILE, (sasl_callback_ft)&safesaslfile, NULL }, #define CB_SAFESASL_IDX 4 { SASL_CB_LIST_END, NULL, NULL } }; -- 2.45.2