Re: SASL 2.1.27 pre-release 1

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

 



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)))
     return;
     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.

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 libobj.la -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]: *** [libobj.la] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2



Please note that *reverting* the following commit:

https://github.com/cyrusimap/cyrus-sasl/commit/ed8bd7643adf94b916a904b56a8f97a818798d58#diff-2bbd410468516599f21e84fecb500348
fixes the above error with "ar" on OSX.



And I also had to change in config.h:
#define WITH_DES /**/
to
/* #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 */
    ^

--
Julien ÉLIE

« – Et si vous ne trouvez pas, je vous fais bouillir et servir aux
    lions avec de la sauce à la menthe !!!
  – Mais c'est horrible ça !
  – Oui, pauvres bêtes ! » (Astérix)



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

  Powered by Linux