summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-10-20 13:00:39 +0300
committerSebastian Dröge <sebastian@centricular.com>2015-10-20 13:00:39 +0300
commitabf2f203e5d47ae1ebecf8357c5ff96a1cdf7b8f (patch)
treeefc269f8c503d033ec1c42c5a82293783be6841a
parent587faefcc7181979fa63ef6034c1143cda855e6c (diff)
glib/glib-networking: Update to 2.46.1
-rw-r--r--recipes/build-tools/glib-tools.recipe10
-rw-r--r--recipes/glib-networking-static.recipe7
-rw-r--r--recipes/glib-networking.recipe7
-rw-r--r--recipes/glib-networking/0003-tlsconnection-fix-memleak.patch26
-rw-r--r--recipes/glib.recipe10
-rw-r--r--recipes/glib/0001-Let-user-disable-Cocoa-and-Carbon-support-on-demand.patch19
-rw-r--r--recipes/glib/0015-Implementation-of-Cocoa-event-loop-integration-in-GM.patch26
-rw-r--r--recipes/glib/0016-gio-Fix-build-on-Android-Lollipop.patch27
-rw-r--r--recipes/glib/0018-gio-ginetaddress.c-Fix-Windows-XP-inet_pton-Emulatio.patch42
-rw-r--r--recipes/glib/0019-Fix-g_inet_address_to_string-on-XP.patch29
-rw-r--r--recipes/glib/0020-Fix-a-FIXME-in-the-WinXP-inet_pton-implementation.patch73
-rw-r--r--recipes/glib/0021-gioerror-Add-more-mappings-for-WinSock-error-codes.patch44
12 files changed, 48 insertions, 272 deletions
diff --git a/recipes/build-tools/glib-tools.recipe b/recipes/build-tools/glib-tools.recipe
index 1f774bf0..4cdac8a7 100644
--- a/recipes/build-tools/glib-tools.recipe
+++ b/recipes/build-tools/glib-tools.recipe
@@ -2,9 +2,9 @@
class Recipe(recipe.Recipe):
name = 'glib-tools'
- version = '2.44.1'
+ version = '2.46.1'
stype = SourceType.TARBALL
- url = 'http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.44/glib-%(version)s.tar.xz'
+ url = 'http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.46/glib-%(version)s.tar.xz'
tarball_dirname = 'glib-%(version)s'
licenses = [License.LGPLv2Plus]
config_sh = 'sh autogen.sh'
@@ -20,11 +20,7 @@ class Recipe(recipe.Recipe):
"../glib/0009-Unhide-_g_io_modules_ensure_extension_points_registe.patch",
'../glib/0014-Don-t-use-AT_FDCWD-on-iOS-for-now.patch',
'../glib/0015-Implementation-of-Cocoa-event-loop-integration-in-GM.patch',
- '../glib/0016-gio-Fix-build-on-Android-Lollipop.patch',
- '../glib/0018-gio-ginetaddress.c-Fix-Windows-XP-inet_pton-Emulatio.patch',
- '../glib/0019-Fix-g_inet_address_to_string-on-XP.patch',
- '../glib/0020-Fix-a-FIXME-in-the-WinXP-inet_pton-implementation.patch',
- '../glib/0021-gioerror-Add-more-mappings-for-WinSock-error-codes.patch'
+ '../glib/0016-gio-Fix-build-on-Android-Lollipop.patch'
]
def prepare(self):
diff --git a/recipes/glib-networking-static.recipe b/recipes/glib-networking-static.recipe
index 53e80639..d9b14f33 100644
--- a/recipes/glib-networking-static.recipe
+++ b/recipes/glib-networking-static.recipe
@@ -6,17 +6,16 @@ from cerbero.utils.shell import which
class Recipe(recipe.Recipe):
name = 'glib-networking-static'
- version = '2.42.1'
+ version = '2.46.1'
licenses = [License.LGPLv2Plus]
stype = SourceType.TARBALL
- url = 'http://ftp.gnome.org/pub/gnome/sources/glib-networking/2.42/glib-networking-%(version)s.tar.xz'
+ url = 'http://ftp.gnome.org/pub/gnome/sources/glib-networking/2.46/glib-networking-%(version)s.tar.xz'
tarball_dirname = 'glib-networking-%(version)s'
autoreconf = True
configure_options = "--without-ca-certificates --enable-static-modules --enable-static --enable-more-warnings"
deps = ['glib', 'gnutls', 'glib-networking']
patches = ['glib-networking/0001-Add-support-for-static-modules.patch',
- 'glib-networking/0002-Get-the-CA-certificate-path-from-the-environment-var.patch',
- 'glib-networking/0003-tlsconnection-fix-memleak.patch']
+ 'glib-networking/0002-Get-the-CA-certificate-path-from-the-environment-var.patch']
files_devel = ['lib/gio/modules/static/libgiognutls.a',
'lib/gio/modules/static/libgiognutls.la']
diff --git a/recipes/glib-networking.recipe b/recipes/glib-networking.recipe
index a3acaf38..b70f21e9 100644
--- a/recipes/glib-networking.recipe
+++ b/recipes/glib-networking.recipe
@@ -4,16 +4,15 @@ from cerbero.utils.shell import which
class Recipe(recipe.Recipe):
name = 'glib-networking'
- version = '2.44.0'
+ version = '2.46.1'
licenses = [License.LGPLv2Plus]
stype = SourceType.TARBALL
- url = 'http://ftp.gnome.org/pub/gnome/sources/glib-networking/2.44/glib-networking-%(version)s.tar.xz'
+ url = 'http://ftp.gnome.org/pub/gnome/sources/glib-networking/2.46/glib-networking-%(version)s.tar.xz'
autoreconf = True
configure_options = "--without-ca-certificates --enable-more-warnings"
deps = ['glib', 'gnutls']
patches = ['glib-networking/0001-Add-support-for-static-modules.patch',
- 'glib-networking/0002-Get-the-CA-certificate-path-from-the-environment-var.patch',
- 'glib-networking/0003-tlsconnection-fix-memleak.patch']
+ 'glib-networking/0002-Get-the-CA-certificate-path-from-the-environment-var.patch']
files_misc = ['lib/gio/modules/libgiognutls%(mext)s']
files_lang = ['glib-networking']
diff --git a/recipes/glib-networking/0003-tlsconnection-fix-memleak.patch b/recipes/glib-networking/0003-tlsconnection-fix-memleak.patch
deleted file mode 100644
index d1559b46..00000000
--- a/recipes/glib-networking/0003-tlsconnection-fix-memleak.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From a6a0291ee977b16d8400b63e5b21f21a5332f799 Mon Sep 17 00:00:00 2001
-From: Nicola Murino <nicola.murino@gmail.com>
-Date: Thu, 24 Sep 2015 12:38:19 +0200
-Subject: [PATCH] tlsconnection: fix memleak
-
-https://bugzilla.gnome.org/show_bug.cgi?id=755535
-
----
- tls/gnutls/gtlsconnection-gnutls.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
-index 4074266..749aa03 100644
---- a/tls/gnutls/gtlsconnection-gnutls.c
-+++ b/tls/gnutls/gtlsconnection-gnutls.c
-@@ -254,6 +254,7 @@ g_tls_connection_gnutls_init_priorities (void)
- fallback_priority = g_strdup_printf ("%s:%%COMPAT:!VERS-TLS-ALL:+VERS-%s",
- cleaned_base,
- gnutls_protocol_get_name (fallback_proto));
-+ g_free (cleaned_base);
- }
- fallback_unsafe_rehandshake_priority = g_strdup_printf ("%s:%%UNSAFE_RENEGOTIATION",
- fallback_priority);
---
-2.5.3
-
diff --git a/recipes/glib.recipe b/recipes/glib.recipe
index 8cac8055..2994defc 100644
--- a/recipes/glib.recipe
+++ b/recipes/glib.recipe
@@ -19,9 +19,9 @@ GLIB_CONFIG_UNVERSAL='''\
class Recipe(recipe.Recipe):
name = 'glib'
- version = '2.44.1'
+ version = '2.46.1'
stype = SourceType.TARBALL
- url = 'http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.44/glib-%(version)s.tar.xz'
+ url = 'http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.46/glib-%(version)s.tar.xz'
licenses = [License.LGPLv2Plus]
config_sh = 'sh autogen.sh'
deps = ['libffi', 'zlib']
@@ -36,11 +36,7 @@ class Recipe(recipe.Recipe):
"glib/0009-Unhide-_g_io_modules_ensure_extension_points_registe.patch",
'glib/0014-Don-t-use-AT_FDCWD-on-iOS-for-now.patch',
'glib/0015-Implementation-of-Cocoa-event-loop-integration-in-GM.patch',
- 'glib/0016-gio-Fix-build-on-Android-Lollipop.patch',
- 'glib/0018-gio-ginetaddress.c-Fix-Windows-XP-inet_pton-Emulatio.patch',
- 'glib/0019-Fix-g_inet_address_to_string-on-XP.patch',
- 'glib/0020-Fix-a-FIXME-in-the-WinXP-inet_pton-implementation.patch',
- 'glib/0021-gioerror-Add-more-mappings-for-WinSock-error-codes.patch'
+ 'glib/0016-gio-Fix-build-on-Android-Lollipop.patch'
]
files_libs = [
diff --git a/recipes/glib/0001-Let-user-disable-Cocoa-and-Carbon-support-on-demand.patch b/recipes/glib/0001-Let-user-disable-Cocoa-and-Carbon-support-on-demand.patch
index b53aaf91..ac37ea94 100644
--- a/recipes/glib/0001-Let-user-disable-Cocoa-and-Carbon-support-on-demand.patch
+++ b/recipes/glib/0001-Let-user-disable-Cocoa-and-Carbon-support-on-demand.patch
@@ -1,4 +1,4 @@
-From ece3ff623acd59821f6b14dd79c9de171c23a271 Mon Sep 17 00:00:00 2001
+From 0c96c0272ceb01f9a4041339dc656de3b89fb066 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Thu, 13 Nov 2014 17:22:59 +0530
Subject: [PATCH] Let user disable Cocoa and Carbon support on demand
@@ -10,7 +10,7 @@ pkg-config file, etc.
1 file changed, 45 insertions(+), 28 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 4a904a4..3308219 100644
+index f8b41e8..40e65c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -169,32 +169,10 @@ AC_MSG_RESULT([$glib_native_android])
@@ -46,7 +46,7 @@ index 4a904a4..3308219 100644
AS_IF([test "$glib_native_win32" = "yes"], [
AC_CHECK_TOOL(WINDRES, windres, no)
-@@ -211,20 +189,59 @@ AS_IF([test "$glib_native_win32" = "yes"], [
+@@ -211,19 +189,58 @@ AS_IF([test "$glib_native_win32" = "yes"], [
])
AM_CONDITIONAL(MS_LIB_AVAILABLE, [test x$ms_librarian = xyes])
@@ -106,12 +106,19 @@ index 4a904a4..3308219 100644
AC_DEFINE(HAVE_COCOA, 1, [define to 1 if Cocoa is available])
COCOA_LIBS="-Wl,-framework,Foundation"
LDFLAGS="$LDFLAGS $COCOA_LIBS"
--], [COCOA_LIBS=""])
-
+ osx_version=`sw_vers -productVersion`
+ osx_min_version="10.9.0"
+ AC_MSG_CHECKING([OSX version >= $osx_min_version])
+@@ -232,7 +249,7 @@ AS_IF([test "x$glib_have_cocoa" = "xyes"], [
+ AC_MSG_ERROR([OSX version is too old!])
+ ])
+ AC_MSG_RESULT([yes])
+-], [COCOA_LIBS=""])
+fi
+
AC_SUBST([COCOA_LIBS])
- dnl declare --enable-* args and collect ac_help strings
--
-2.1.0
+2.6.1
diff --git a/recipes/glib/0015-Implementation-of-Cocoa-event-loop-integration-in-GM.patch b/recipes/glib/0015-Implementation-of-Cocoa-event-loop-integration-in-GM.patch
index bfff967d..ffc373e7 100644
--- a/recipes/glib/0015-Implementation-of-Cocoa-event-loop-integration-in-GM.patch
+++ b/recipes/glib/0015-Implementation-of-Cocoa-event-loop-integration-in-GM.patch
@@ -1,4 +1,4 @@
-From 4c45757b1687f27e20163a2f3bc560d250dbc123 Mon Sep 17 00:00:00 2001
+From 9c9505f39bac91f514f5f0f8296c94d18b05489d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
Date: Fri, 12 Dec 2014 16:40:23 +0100
Subject: [PATCH] Implementation of Cocoa event loop integration in
@@ -11,7 +11,7 @@ Subject: [PATCH] Implementation of Cocoa event loop integration in
3 files changed, 996 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 511d404..b3aab01 100644
+index 40e65c4..5736e0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -239,7 +239,7 @@ AM_CONDITIONAL(OS_COCOA, [test "$glib_have_cocoa" = "yes"])
@@ -21,13 +21,13 @@ index 511d404..b3aab01 100644
- COCOA_LIBS="-Wl,-framework,Foundation"
+ COCOA_LIBS="-Wl,-framework,Foundation -Wl,-framework,AppKit"
LDFLAGS="$LDFLAGS $COCOA_LIBS"
- fi
- AC_SUBST([COCOA_LIBS])
+ osx_version=`sw_vers -productVersion`
+ osx_min_version="10.9.0"
diff --git a/glib/Makefile.am b/glib/Makefile.am
-index 1b9e081..27ae84f 100644
+index 2783b51..de06789 100644
--- a/glib/Makefile.am
+++ b/glib/Makefile.am
-@@ -42,6 +42,10 @@ AM_CPPFLAGS = \
+@@ -44,6 +44,10 @@ AM_CPPFLAGS = \
-DGLIB_COMPILATION \
-DPCRE_STATIC
@@ -38,7 +38,7 @@ index 1b9e081..27ae84f 100644
AM_CFLAGS = $(GLIB_WARN_CFLAGS)
MIRRORING_TAB_SOURCE = \
-@@ -348,7 +352,7 @@ pcre_inc =
+@@ -351,7 +355,7 @@ pcre_inc =
endif
libglib_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
@@ -48,7 +48,7 @@ index 1b9e081..27ae84f 100644
libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
diff --git a/glib/gmain.c b/glib/gmain.c
-index 30fac70..c25e5bf 100644
+index 9b90100..8ab6a3e 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -71,6 +71,10 @@
@@ -62,7 +62,7 @@ index 30fac70..c25e5bf 100644
#ifdef HAVE_MACH_MACH_TIME_H
#include <mach/mach_time.h>
#endif
-@@ -419,6 +423,90 @@ static GMainContext *glib_worker_context;
+@@ -448,6 +452,90 @@ static GMainContext *glib_worker_context;
G_LOCK_DEFINE_STATIC (main_loop);
static GMainContext *default_main_context;
@@ -153,7 +153,7 @@ index 30fac70..c25e5bf 100644
#ifndef G_OS_WIN32
-@@ -3174,6 +3262,36 @@ g_main_context_acquire (GMainContext *context)
+@@ -3217,6 +3305,36 @@ g_main_context_acquire (GMainContext *context)
{
context->owner = self;
g_assert (context->owner_count == 0);
@@ -190,7 +190,7 @@ index 30fac70..c25e5bf 100644
}
if (context->owner == self)
-@@ -3223,6 +3341,25 @@ g_main_context_release (GMainContext *context)
+@@ -3266,6 +3384,25 @@ g_main_context_release (GMainContext *context)
if (!loop_internal_waiter)
g_mutex_unlock (waiter->mutex);
}
@@ -216,7 +216,7 @@ index 30fac70..c25e5bf 100644
}
UNLOCK_CONTEXT (context);
-@@ -5622,3 +5759,856 @@ g_get_worker_context (void)
+@@ -5705,3 +5842,856 @@ g_get_worker_context (void)
return glib_worker_context;
}
@@ -1074,5 +1074,5 @@ index 30fac70..c25e5bf 100644
+
+#endif
--
-1.9.3 (Apple Git-50)
+2.6.1
diff --git a/recipes/glib/0016-gio-Fix-build-on-Android-Lollipop.patch b/recipes/glib/0016-gio-Fix-build-on-Android-Lollipop.patch
index 7dd6f214..439ec5f3 100644
--- a/recipes/glib/0016-gio-Fix-build-on-Android-Lollipop.patch
+++ b/recipes/glib/0016-gio-Fix-build-on-Android-Lollipop.patch
@@ -1,4 +1,4 @@
-From b2479dd810349aacf539c0a92fba7b2d2a9eda6c Mon Sep 17 00:00:00 2001
+From 32f26819f765cce5c69917a8184dd470623bd200 Mon Sep 17 00:00:00 2001
From: Edward Hervey <bilboed@bilboed.com>
Date: Tue, 27 Jan 2015 16:27:13 +0100
Subject: [PATCH] gio: Fix build on Android Lollipop
@@ -6,30 +6,23 @@ Subject: [PATCH] gio: Fix build on Android Lollipop
The various nameser headers are public headers starting from Android L
(target arch 21).
---
- gio/gthreadedresolver.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ gio/gthreadedresolver.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gio/gthreadedresolver.c b/gio/gthreadedresolver.c
-index c02c593..0af726a 100644
+index 2ba42f1..a70e8df 100644
--- a/gio/gthreadedresolver.c
+++ b/gio/gthreadedresolver.c
-@@ -264,6 +264,7 @@ lookup_by_address_finish (GResolver *resolver,
+@@ -263,7 +263,7 @@ lookup_by_address_finish (GResolver *resolver,
+
#if defined(G_OS_UNIX)
- #ifdef __BIONIC__
-+#if __ANDROID_API__ < 21
+-#if defined __BIONIC__ && !defined BIND_4_COMPAT
++#if defined __BIONIC__ && !defined BIND_4_COMPAT && __ANDROID_API__ < 21
/* Copy from bionic/libc/private/arpa_nameser_compat.h
* and bionic/libc/private/arpa_nameser.h */
typedef struct {
-@@ -396,6 +397,7 @@ typedef enum __ns_type {
- ns_t_max = 65536
- } ns_type;
-
-+#endif /* __ANDROID_API__ < 21 */
- #endif /* __BIONIC__ */
-
- static GVariant *
-@@ -801,7 +803,6 @@ free_records (GList *records)
+@@ -801,7 +801,6 @@ free_records (GList *records)
#if defined(G_OS_UNIX)
#ifdef __BIONIC__
@@ -38,5 +31,5 @@ index c02c593..0af726a 100644
#endif
#endif
--
-2.1.0
+2.6.1
diff --git a/recipes/glib/0018-gio-ginetaddress.c-Fix-Windows-XP-inet_pton-Emulatio.patch b/recipes/glib/0018-gio-ginetaddress.c-Fix-Windows-XP-inet_pton-Emulatio.patch
deleted file mode 100644
index d67043c3..00000000
--- a/recipes/glib/0018-gio-ginetaddress.c-Fix-Windows-XP-inet_pton-Emulatio.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 3e29dadae46fe4d1e26ff91c30d9d3b84eb6d84e Mon Sep 17 00:00:00 2001
-From: Chun-wei Fan <fanchunwei@src.gnome.org>
-Date: Tue, 23 Jun 2015 13:52:25 +0800
-Subject: [PATCH] gio/ginetaddress.c: Fix Windows XP inet_pton() Emulation
-
-We need to be more careful when we try to assign values to gpointers, so
-that means we have to assign the value to the properly-dereference
-gpointer, so that the assigned value will be retained after the function
-returns. This code will be dropped soon, but it is done for XP
-compatibility's sake for 2.44.
-
-Should fix the issue reported in bug 730352 comment #24.
----
- gio/ginetaddress.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/gio/ginetaddress.c b/gio/ginetaddress.c
-index 8723c28..39610ae 100644
---- a/gio/ginetaddress.c
-+++ b/gio/ginetaddress.c
-@@ -417,7 +417,8 @@ inet_pton (gint family,
- /* XXX: Figure out when WSAStringToAddress() accepts a IPv4 address but the
- numbers-and-dots address is actually not complete. This code will be
- removed once XP/Server 2003 support is dropped... */
-- addr = &sin->sin_addr;
-+ *(IN_ADDR *) addr = sin->sin_addr;
-+
- return 1;
- }
- }
-@@ -425,7 +426,7 @@ inet_pton (gint family,
- {
- if (WSAStringToAddress ((LPTSTR) addr_string, AF_INET6, NULL, (LPSOCKADDR) &sa, &len) == 0)
- {
-- addr = &sin6->sin6_addr;
-+ *(IN6_ADDR *) addr = sin6->sin6_addr;
- return 1;
- }
- }
---
-2.4.5
-
diff --git a/recipes/glib/0019-Fix-g_inet_address_to_string-on-XP.patch b/recipes/glib/0019-Fix-g_inet_address_to_string-on-XP.patch
deleted file mode 100644
index 4d4c537a..00000000
--- a/recipes/glib/0019-Fix-g_inet_address_to_string-on-XP.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From a4c3ab58ccf32b0f50ce6f78fa7d18ee5745d510 Mon Sep 17 00:00:00 2001
-From: Wouter Paesen <wouter@blue-gate.be>
-Date: Tue, 26 May 2015 17:03:50 +0200
-Subject: [PATCH] Fix g_inet_address_to_string() on XP
-
-[This patch originally also included an equivalent to the fix that was
-committed in 3e29dada, but that was not the complete fix for the bug.]
-
-https://bugzilla.gnome.org/show_bug.cgi?id=749911
----
- gio/ginetaddress.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gio/ginetaddress.c b/gio/ginetaddress.c
-index 39610ae..9e069a4 100644
---- a/gio/ginetaddress.c
-+++ b/gio/ginetaddress.c
-@@ -446,7 +446,7 @@ inet_ntop (gint family,
- else
- {
- /* Fallback codepath for XP/Server 2003 */
-- DWORD buflen = sizeof (addr_str), addrlen;
-+ DWORD buflen = size, addrlen;
- struct sockaddr_storage sa;
- struct sockaddr_in *sin = (struct sockaddr_in *)&sa;
- struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&sa;
---
-2.4.5
-
diff --git a/recipes/glib/0020-Fix-a-FIXME-in-the-WinXP-inet_pton-implementation.patch b/recipes/glib/0020-Fix-a-FIXME-in-the-WinXP-inet_pton-implementation.patch
deleted file mode 100644
index 3938498f..00000000
--- a/recipes/glib/0020-Fix-a-FIXME-in-the-WinXP-inet_pton-implementation.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From f9af40a1330a8226d72c96bff56cdb4ab895dac7 Mon Sep 17 00:00:00 2001
-From: Dan Winship <danw@gnome.org>
-Date: Tue, 9 Jun 2015 09:19:43 -0400
-Subject: [PATCH] Fix a FIXME in the WinXP inet_pton() implementation
-
-https://bugzilla.gnome.org/show_bug.cgi?id=749912
----
- gio/ginetaddress.c | 44 ++++++++++++++++----------------------------
- 1 file changed, 16 insertions(+), 28 deletions(-)
-
-diff --git a/gio/ginetaddress.c b/gio/ginetaddress.c
-index 9e069a4..c83f750 100644
---- a/gio/ginetaddress.c
-+++ b/gio/ginetaddress.c
-@@ -398,39 +398,27 @@ inet_pton (gint family,
- struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&sa;
- gint len = sizeof (sa);
-
-- /* We need to make sure to not pass a string of the form
-- * "IPv4addr:port" or "[IPv6addr]:port" to WSAStringToAddress(),
-- * since it would accept them (returning both the address and the
-- * port), but we only want to accept standalone IP addresses. (In
-- * the IPv6 case, WINE actually only checks for the ']', not the
-- * '[', which is why we do the same here.)
-- */
- if (family != AF_INET && family != AF_INET6)
- {
- WSASetLastError (WSAEAFNOSUPPORT);
- return -1;
- }
-- if (!strchr (addr_string, ':'))
-- {
-- if (WSAStringToAddress ((LPTSTR) addr_string, AF_INET, NULL, (LPSOCKADDR) &sa, &len) == 0)
-- {
-- /* XXX: Figure out when WSAStringToAddress() accepts a IPv4 address but the
-- numbers-and-dots address is actually not complete. This code will be
-- removed once XP/Server 2003 support is dropped... */
-- *(IN_ADDR *) addr = sin->sin_addr;
--
-- return 1;
-- }
-- }
-- if (!strchr (addr_string, ']'))
-- {
-- if (WSAStringToAddress ((LPTSTR) addr_string, AF_INET6, NULL, (LPSOCKADDR) &sa, &len) == 0)
-- {
-- *(IN6_ADDR *) addr = sin6->sin6_addr;
-- return 1;
-- }
-- }
-- return 0;
-+
-+ /* WSAStringToAddress() will accept various not-an-IP-address
-+ * strings like "127.0.0.1:80", "[1234::5678]:80", "127.1", etc.
-+ */
-+ if (!g_hostname_is_ip_address (addr_string))
-+ return 0;
-+
-+ if (WSAStringToAddress ((LPTSTR) addr_string, family, NULL, (LPSOCKADDR) &sa, &len) != 0)
-+ return 0;
-+
-+ if (family == AF_INET)
-+ *(IN_ADDR *)addr = sin->sin_addr;
-+ else
-+ *(IN6_ADDR *)addr = sin6->sin6_addr;
-+
-+ return 1;
- }
- }
-
---
-2.4.5
-
diff --git a/recipes/glib/0021-gioerror-Add-more-mappings-for-WinSock-error-codes.patch b/recipes/glib/0021-gioerror-Add-more-mappings-for-WinSock-error-codes.patch
deleted file mode 100644
index dcb8445b..00000000
--- a/recipes/glib/0021-gioerror-Add-more-mappings-for-WinSock-error-codes.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 27df2bc8cd9d52f0e52ced942e244b3c9fbe48e4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
-Date: Fri, 4 Sep 2015 11:58:57 +0300
-Subject: [PATCH] gioerror: Add more mappings for WinSock error codes
-
----
- gio/gioerror.c | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-diff --git a/gio/gioerror.c b/gio/gioerror.c
-index 0faff25..c069347 100644
---- a/gio/gioerror.c
-+++ b/gio/gioerror.c
-@@ -301,6 +301,7 @@ g_io_error_from_win32_error (gint error_code)
-
- case WSA_INVALID_HANDLE:
- case WSA_INVALID_PARAMETER:
-+ case WSAEINVAL:
- case WSAEBADF:
- case WSAENOTSOCK:
- return G_IO_ERROR_INVALID_ARGUMENT;
-@@ -320,6 +321,19 @@ g_io_error_from_win32_error (gint error_code)
- case WSAECONNRESET:
- return G_IO_ERROR_CONNECTION_CLOSED;
-
-+ case WSAEHOSTUNREACH:
-+ return G_IO_ERROR_HOST_UNREACHABLE;
-+
-+ case WSAENETUNREACH:
-+ return G_IO_ERROR_NETWORK_UNREACHABLE;
-+
-+ case WSAECONNREFUSED:
-+ return G_IO_ERROR_CONNECTION_REFUSED;
-+
-+ case WSAETIMEDOUT:
-+ return G_IO_ERROR_TIMED_OUT;
-+
-+ case WSAENOTCONN:
- case ERROR_PIPE_LISTENING:
- return G_IO_ERROR_NOT_CONNECTED;
-
---
-2.5.1
-