diff --git a/mailx-12.5-ipv6.dif b/mailx-12.5-ipv6.dif new file mode 100644 index 0000000..63e2c89 --- /dev/null +++ b/mailx-12.5-ipv6.dif @@ -0,0 +1,30 @@ +--- Makefile ++++ Makefile 2013-12-03 08:14:47.362446079 +0000 +@@ -46,7 +67,7 @@ SHELL = /bin/sh + + # If you know that the IPv6 functions work on your machine, you can enable + # them here. +-##IPv6 = -DHAVE_IPv6_FUNCS ++IPv6 = -DHAVE_IPv6_FUNCS + + # + # Binaries are stripped with this command after installation. +--- fio.c ++++ fio.c 2013-12-03 08:55:19.158236784 +0000 +@@ -1024,6 +1024,16 @@ sopen(const char *xserver, struct sock * + char *cp; + char *server = (char *)xserver; + ++#ifdef HAVE_IPv6_FUNCS ++ if ((cp = strchr(server, ']')) != NULL) { ++ if (cp[1] == ':') { ++ portstr = &cp[2]; ++ server = salloc(cp+1 - xserver+1); ++ memcpy(server, xserver, cp+1 - xserver); ++ server[cp+1 - xserver] = '\0'; ++ } ++ } else ++#endif /* HAVE_IPv6_FUNCS */ + if ((cp = strchr(server, ':')) != NULL) { + portstr = &cp[1]; + #ifndef HAVE_IPv6_FUNCS diff --git a/mailx.changes b/mailx.changes index 59a4a7e..49737d5 100644 --- a/mailx.changes +++ b/mailx.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Dec 3 09:06:50 UTC 2013 - werner@suse.de + +- Add patch mailx-12.5-ipv6.dif to enable mailx to parse IPv6 addresses + including a port. We do only support the [ipv6]:port syntax (bnc#853246) + ------------------------------------------------------------------- Tue Jul 2 10:29:35 UTC 2013 - werner@suse.de diff --git a/mailx.spec b/mailx.spec index d318b2c..f09668c 100644 --- a/mailx.spec +++ b/mailx.spec @@ -41,6 +41,8 @@ Patch5: mailx-%{version}-mime.dif Patch6: mailx-fix-openssl.patch #PATCH-FIX-OPENSUSE: Try to tranquilize gcc warning about parentheses (please check!) Patch7: mailx-12.5-parentheses.dif +#PATCH-FIX-SUSE: Try to tranquilize gcc warning about parentheses (please check!) +Patch8: mailx-12.5-ipv6.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -59,7 +61,8 @@ minor enhancements like the ability to set a "From:" address. %patch5 -p0 -b .mime %patch6 -p0 -b .ssl %patch7 -p0 -b .par -%patch -p0 +%patch8 -p0 -b .ipv6 +%patch -p0 -b .0 %build CC=gcc