Hello Thomas,
On Tue, Dec 30, 2003 at 04:00:08AM +0000, Thomas Roessler wrote:
> 2003-12-29 11:37:41 Patrick Welche <prlw1@xxxxxxxxxxxxxx> (roessler)
>
> * m4/gssapi.m4, mutt_sasl.c: A while ago I posted a similar
> patch which is necessary as when mutt tries to connect to an
> imap server over ipv6 it stores the address in a sockaddr which
> may not be large enough to hold the ipv6 address.
./configure --with-sasl2 --enable-imap && make
on vanilla mutt sources gives:
mutt_sasl.c: In function `mutt_sasl_client_new':
mutt_sasl.c:206: error: structure has no member named `ss_len'
mutt_sasl.c:217: error: structure has no member named `ss_len'
(and some warnings).
ss_len is not universal field, at least Linux has not it, the same on SunOs.
Attached patch backs to previous behavior where sizeof(variable) is used.
I could write a test for autoconf to check if ss_len is available, but I am
not sure if it is worth the effort.
Cheers
Artur
--
Wyjaśnienie odwołujące się do przetrwania, niczego nie wyjaśnia,
dopóki nie wyjaśni się, dlaczego przetrwanie przetrwało
/Pierre Bourdieu, Jean Claude Passeron "Reprodukcja"/
--- mutt_sasl.c.orig 2004-01-05 00:24:49.000000000 +0100
+++ mutt_sasl.c 2004-01-05 00:27:23.000000000 +0100
@@ -203,7 +203,7 @@
return -1;
}
else
- if (iptostring((struct sockaddr *)&local, local.ss_len, iplocalport,
IP_PORT_BUFLEN) != SASL_OK){
+ if (iptostring((struct sockaddr *)&local, size, iplocalport, IP_PORT_BUFLEN)
!= SASL_OK){
dprint (1, (debugfile, "mutt_sasl_client_new: iptostring for local
failed\n"));
return -1;
}
@@ -214,7 +214,7 @@
return -1;
}
else
- if (iptostring((struct sockaddr *)&remote, remote.ss_len, ipremoteport,
IP_PORT_BUFLEN) != SASL_OK){
+ if (iptostring((struct sockaddr *)&remote, size, ipremoteport,
IP_PORT_BUFLEN) != SASL_OK){
dprint (1, (debugfile, "mutt_sasl_client_new: iptostring for remote
failed\n"));
return -1;
}
Attachment:
signature.asc
Description: Digital signature