enable GLib threading
Call g_thread_init() from main() to enable the GLib features which make it thread safe.
This commit is contained in:
parent
06f9b6c379
commit
259c6ed164
|
@ -274,7 +274,7 @@ AC_CHECK_LIB(nsl,gethostbyname,MPD_LIBS="$MPD_LIBS -lnsl",)
|
|||
AC_CHECK_LIB(m,exp,MPD_LIBS="$MPD_LIBS -lm",)
|
||||
AC_CHECK_FUNCS(setenv)
|
||||
|
||||
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.4],,
|
||||
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.4 gthread-2.0],,
|
||||
[AC_MSG_ERROR([glib-2.4 is required])])
|
||||
|
||||
dnl doesn't work for systems that don't have CODESET like OpenBSD
|
||||
|
|
|
@ -382,6 +382,9 @@ int main(int argc, char *argv[])
|
|||
Options options;
|
||||
clock_t start;
|
||||
|
||||
/* enable GLib's thread safety code */
|
||||
g_thread_init(NULL);
|
||||
|
||||
initConf();
|
||||
|
||||
parseOptions(argc, argv, &options);
|
||||
|
|
Loading…
Reference in New Issue