Skip to content
Snippets Groups Projects
Commit dc345f90 authored by Nirbheek Chauhan's avatar Nirbheek Chauhan :ant:
Browse files

glib-networking: Fix module symbol exporting with MSVC

parent fe0c66ce
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,9 @@ class Recipe(recipe.Recipe):
# since we can no longer set the certificate path in glib-networking
name + '/0003-Use-the-GnuTLS-system-trust-by-default.patch',
name + '/0004-meson-Only-run-gio-querymodules-if-it-s-found.patch',
name + '/0001-Don-t-use-the-GCC-ternary-syntax-extension.patch']
name + '/0001-Don-t-use-the-GCC-ternary-syntax-extension.patch',
# https://gitlab.gnome.org/GNOME/glib-networking/merge_requests/22
name + '/0001-tls-modules-Export-load-unload-query-symbols-on-MSVC.patch']
files_misc = ['lib/gio/modules/libgiognutls%(mext)s']
files_lang = ['glib-networking']
......
From dab7c001aaf3f5863873f51a22f0c00b993f52ab Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Wed, 20 Feb 2019 14:47:04 +0530
Subject: [PATCH] tls modules: Export load/unload/query symbols on MSVC
These must be explicitly exported or the DLLs outputted won't be
loadable
'g_io_gnutls_load': The specified procedure could not be found.
Failed to load module: c:\path\to\lib\gio\modules\giognutls.dll
---
tls/gnutls/gnutls-module.c | 6 +++---
tls/openssl/openssl-module.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tls/gnutls/gnutls-module.c b/tls/gnutls/gnutls-module.c
index 8983bd7..8dd09ca 100644
--- a/tls/gnutls/gnutls-module.c
+++ b/tls/gnutls/gnutls-module.c
@@ -30,7 +30,7 @@
#include "gtlsbackend-gnutls-pkcs11.h"
-void
+G_MODULE_EXPORT void
g_io_gnutls_load (GIOModule *module)
{
gchar *locale_dir;
@@ -53,12 +53,12 @@ g_io_gnutls_load (GIOModule *module)
g_free (locale_dir);
}
-void
+G_MODULE_EXPORT void
g_io_gnutls_unload (GIOModule *module)
{
}
-gchar **
+G_MODULE_EXPORT gchar **
g_io_gnutls_query (void)
{
gchar *eps[] = {
--
2.20.1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment