Re: SASL 2.1.27 pre-release 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 12/09/2016 04:57 PM, Julien ÉLIE via Cyrus-sasl wrote:
Hi Ken,

Rather than stealing a bunch of per-platform #ifdefs from Apple, I'm
wondering if this simple typecast would work.  This would essentially be
doing the same thing that happens on those platforms that use a union
inside struct in6_addr.

diff --git a/plugins/plugin_common.c b/plugins/plugin_common.c
index f2b26bd..1d633ee 100644
--- a/plugins/plugin_common.c
+++ b/plugins/plugin_common.c
@@ -94,7 +94,7 @@ static void sockaddr_unmapped(
     if (!IN6_IS_ADDR_V4MAPPED((&sin6->sin6_addr)))
     sin4 = (struct sockaddr_in *)sa;
-    addr = *(uint32_t *)&sin6->sin6_addr.s6_addr32[3];
+    addr = *(uint32_t *)&sin6->sin6_addr.s6_addr[12];
     port = sin6->sin6_port;
     memset(sin4, 0, sizeof(struct sockaddr_in));
     sin4->sin_addr.s_addr = addr;

I confirm this patch works, and permits to build plugin_common.c.

I just committed a slightly different fix.

However, the build aborts afterwards with the following error:

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -DLIBSASL_EXPORTS=1 -I../include -I../plugins -I../include -I../sasldb -DOBSOLETE_CRAM_ATTR=1 -Wall -W -g -O2 -MT ../plugins/plugin_common.lo -MD -MP -MF ../plugins/.deps/plugin_common.Tpo -c ../plugins/plugin_common.c -fno-common -DPIC -o ../plugins/.libs/plugin_common.o /bin/sh ../libtool --tag=CC --mode=link gcc -Wall -W -g -O2 -o -lresolv -lresolv
libtool: link: ar cru .libs/libobj.a
ar: no archive members specified
usage:  ar -d [-TLsv] archive file ...
    ar -m [-TLsv] archive file ...
    ar -m [-abiTLsv] position archive file ...
    ar -p [-TLsv] archive [file ...]
    ar -q [-cTLsv] archive file ...
    ar -r [-cuTLsv] archive file ...
    ar -r [-abciuTLsv] position archive file ...
    ar -t [-TLsv] archive [file ...]
    ar -x [-ouTLsv] archive [file ...]
make[3]: *** [] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Please note that *reverting* the following commit:
fixes the above error with "ar" on OSX.

Hmm.  I will look into this.

And I also had to change in config.h:
#define WITH_DES /**/
/* #define WITH_DES */

I otherwise had errors like:

digestmd5.c:860:5: error: unknown type name 'des_key_schedule'
    des_key_schedule keysched;  /* key schedule for des initialization */

Wouldn't adding --with-des=no  to your configure options do the same thing?

Kenneth Murchison
Principal Systems Software Engineer
Carnegie Mellon University

[Index of Archives]     [Info Cyrus]     [Squirrel Mail]     [Linux Media]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux