dovecot-2.2: lib: Fixed unit test with big-endian CPUs.

dovecot at dovecot.org dovecot at dovecot.org
Mon Jun 29 10:39:28 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/b268e186d029
changeset: 18892:b268e186d029
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jun 29 13:36:38 2015 +0300
description:
lib: Fixed unit test with big-endian CPUs.
Patch by Michal Hlavinka / Redhat

diffstat:

 src/lib/test-net.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 740935acc0f8 -r b268e186d029 src/lib/test-net.c
--- a/src/lib/test-net.c	Mon Jun 29 13:06:03 2015 +0300
+++ b/src/lib/test-net.c	Mon Jun 29 13:36:38 2015 +0300
@@ -56,7 +56,7 @@
 	test_begin("net_ip2addr()");
 	test_assert(net_addr2ip("127.0.0.1", &ip) == 0 &&
 		    ip.family == AF_INET &&
-		    ip.u.ip4.s_addr == (127 | (1 << 24)));
+		    ntohl(ip.u.ip4.s_addr) == (0x7f000001));
 #ifdef HAVE_IPV6
 	test_assert(net_addr2ip("::5", &ip) == 0 &&
 		    ip.family == AF_INET6 &&


More information about the dovecot-cvs mailing list