summaryrefslogtreecommitdiff
path: root/recipes/glib
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2019-01-05 01:41:20 +0100
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2019-06-07 10:15:44 -0400
commit1100f0321b592d2b63cf42f7f39be81663cb1a3f (patch)
tree15b450d81363b4318845ae0722adf35892502ed5 /recipes/glib
parent430056babf09fcfbafa7ab3c6d224fa92df3fbdf (diff)
glib: fix build with newer MinGW
Diffstat (limited to 'recipes/glib')
-rw-r--r--recipes/glib/0001-DO-NOT-UPSTREAM-Prototypes-missing-in-Cerbero-s-anci.patch81
1 files changed, 0 insertions, 81 deletions
diff --git a/recipes/glib/0001-DO-NOT-UPSTREAM-Prototypes-missing-in-Cerbero-s-anci.patch b/recipes/glib/0001-DO-NOT-UPSTREAM-Prototypes-missing-in-Cerbero-s-anci.patch
deleted file mode 100644
index 00dc4f1d..00000000
--- a/recipes/glib/0001-DO-NOT-UPSTREAM-Prototypes-missing-in-Cerbero-s-anci.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From c4e79cb2456d7018c05a9480bcb42994060e8cda Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek@centricular.com>
-Date: Sun, 6 May 2018 16:06:13 +0530
-Subject: [PATCH] DO NOT UPSTREAM: Prototypes missing in Cerbero's ancient
- MinGW
-
----
- gio/ginetaddress.c | 3 ++-
- glib/grand.c | 4 ++++
- gmodule/gmodule-win32.c | 13 +++++++++++++
- 3 files changed, 19 insertions(+), 1 deletion(-)
-
-diff --git a/gio/ginetaddress.c b/gio/ginetaddress.c
-index 0a0a85a48..4fc8119ff 100644
---- a/gio/ginetaddress.c
-+++ b/gio/ginetaddress.c
-@@ -381,7 +381,8 @@ g_inet_address_init (GInetAddress *address)
- * on Windows XP/Server 2003. We can drop this portion when we drop support for
- * XP/Server 2003.
- */
--#if defined(G_OS_WIN32) && _WIN32_WINNT < 0x0600
-+/* XXX: Cerbero's MinGW is too ancient to have InetPton/InetNtop */
-+#if defined(G_OS_WIN32) && (_WIN32_WINNT < 0x0600 || defined(__MINGW32__))
- static gint
- inet_pton (gint family,
- const gchar *addr_string,
-diff --git a/glib/grand.c b/glib/grand.c
-index 610fc69c6..5a72af12a 100644
---- a/glib/grand.c
-+++ b/glib/grand.c
-@@ -57,6 +57,10 @@
- #ifdef G_OS_WIN32
- #include <stdlib.h>
- #include <process.h> /* For getpid() */
-+/* XXX: Cerbero MinGW is too ancient to have this */
-+#ifdef __MINGW32__
-+errno_t __cdecl rand_s(unsigned int *randomValue);
-+#endif
- #endif
-
- /**
-diff --git a/gmodule/gmodule-win32.c b/gmodule/gmodule-win32.c
-index 20459f372..c9d854434 100644
---- a/gmodule/gmodule-win32.c
-+++ b/gmodule/gmodule-win32.c
-@@ -39,6 +39,10 @@
- #include <sys/cygwin.h>
- #endif
-
-+#ifdef __MINGW32__
-+WINBASEAPI WINBOOL WINAPI SetThreadErrorMode (DWORD dwNewMode, LPDWORD lpOldMode);
-+#endif
-+
- static void
- set_error (const gchar *format,
- ...)
-@@ -81,12 +85,21 @@ _g_module_open (const gchar *file_name,
- wfilename = g_utf8_to_utf16 (file_name, -1, NULL, NULL, NULL);
-
- /* suppress error dialog */
-+#ifdef __MINGW32__
-+ /* XXX: Cerbero MinGW is too ancient to have SetThreadErrorMode */
-+ SetErrorMode (SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS);
-+#else
- success = SetThreadErrorMode (SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS, &old_mode);
- if (!success)
- set_error ("");
-+#endif
- handle = LoadLibraryW (wfilename);
-+#ifdef __MINGW32__
-+ SetErrorMode (0);
-+#else
- if (success)
- SetThreadErrorMode (old_mode, NULL);
-+#endif
- g_free (wfilename);
-
- if (!handle)
---
-2.17.0
-