From c3e52ea6ca3178b7ecab4b389a9ba9269662b48f Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Wed, 15 Mar 2006 17:05:25 +0000 Subject: Further cleanups to compile with C++ compiler. svn path=/branches/BRANCH_6-3/; revision=4744 --- pop3.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'pop3.c') diff --git a/pop3.c b/pop3.c index ff68f614..4456b2d3 100644 --- a/pop3.c +++ b/pop3.c @@ -23,7 +23,13 @@ #include "i18n.h" #ifdef OPIE_ENABLE +#ifdef __cplusplus +extern "C" { +#endif #include +#ifdef __cplusplus +} +#endif #endif /* OPIE_ENABLE */ /* global variables: please reinitialize them explicitly for proper @@ -533,8 +539,10 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting) if ((challenge = strstr(lastok, "otp-"))) { char response[OPIE_RESPONSE_MAX+1]; int i; + char *n = xstrdup(""); - i = opiegenerator(challenge, !strcmp(ctl->password, "opie") ? "" : ctl->password, response); + i = opiegenerator(challenge, !strcmp(ctl->password, "opie") ? n : ctl->password, response); + free(n); if ((i == -2) && !run.poll_interval) { char secret[OPIE_SECRET_MAX+1]; fprintf(stderr, GT_("Secret pass phrase: ")); -- cgit v1.2.3