On emscripten, function pointer casts can cause function call failure. g_list_sort and g_slist_sort performs this internally so can't be used on Emscripten. Instead, g_list_sort_with_data and g_slist_sort_with_data should be used.
Signed-off-by: Kohei Tokunaga <ktokunaga.m...@gmail.com> --- include/glib-compat.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/glib-compat.h b/include/glib-compat.h index 86be439ba0..e441b396ef 100644 --- a/include/glib-compat.h +++ b/include/glib-compat.h @@ -36,6 +36,12 @@ #include <pwd.h> #endif +/* These functions perform function pointer casts which can cause function call + * failure on Emscripten. Use g_slist_sort_with_data and g_list_sort_with_data + * insted of these functions. + */ +#pragma GCC poison g_slist_sort g_list_sort + /* * Note that because of the GLIB_VERSION_MAX_ALLOWED constant above, allowing * use of functions from newer GLib via this compat header needs a little -- 2.25.1