if (did_glib_init) return;
did_glib_init = TRUE;
- /* set up libcurl */
+ /* set up libcurl (this must happen before threading
+ * is initialized) */
#ifdef HAVE_LIBCURL
# ifdef G_THREADS_ENABLED
# if (GLIB_MAJOR_VERSION < 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 31))