summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.adoc1
-rw-r--r--src/plugins/guile/weechat-guile.c15
2 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index b84838f76..d9c0a2f57 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -91,6 +91,7 @@ Bug fixes::
* api: readjust string size in function string_dyn_free when string is not freed
* buflist: do not display keys added in default context on first load
* fset: remove scroll to top of fset buffer when options are added or removed (issue #1892)
+ * guile: fix crash when plugin is loaded on GNU/Hurd (issue #1951)
* irc: fix format of IRC tags displayed in messages (use "=" to separate key from value, do not convert "_" to "-") (issue #1929)
* irc: reset all internal servers variables when disconnecting
* irc: start from the beginning of nicks at automatic reconnection (issue #337, issue #965)
diff --git a/src/plugins/guile/weechat-guile.c b/src/plugins/guile/weechat-guile.c
index 3be050095..b7b05d456 100644
--- a/src/plugins/guile/weechat-guile.c
+++ b/src/plugins/guile/weechat-guile.c
@@ -1231,6 +1231,19 @@ weechat_guile_port_write (SCM port, const void *data, size_t size)
#endif
/*
+ * Callback called by scm_with_guile().
+ */
+
+void *
+weechat_guile_init (void *data)
+{
+ /* make C compiler happy */
+ (void) data;
+
+ return NULL;
+}
+
+/*
* Initializes guile plugin.
*/
@@ -1276,7 +1289,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
scm_install_gmp_memory_functions = 0;
#endif /* defined(HAVE_GUILE_GMP_MEMORY_FUNCTIONS) && (SCM_MAJOR_VERSION < 3 || (SCM_MAJOR_VERSION == 3 && SCM_MINOR_VERSION == 0 && SCM_MICRO_VERSION < 8)) */
- scm_init_guile ();
+ scm_with_guile (&weechat_guile_init, NULL);
guile_module_weechat = scm_c_define_module ("weechat",
&weechat_guile_api_module_init,