Threading support is always enabled in dbus since version 1.8 released in 2014: • libdbus always behaves as if dbus_threads_init_default() had been called (thread-safety by default) so remove the obsolete option. Note that we also require glib 2.36, which is newer than the version of glib with GThread support built-in: [Since 2.32] This function is no longer necessary. The GLib threading system is automatically initialized at the start of your program. --- configure.ac | 8 -------- obexd/src/main.c | 7 ------- obexd/src/plugin.c | 5 ----- 3 files changed, 20 deletions(-) diff --git a/configure.ac b/configure.ac index ab2c6716eb3a..52689b4f963a 100644 --- a/configure.ac +++ b/configure.ac @@ -83,14 +83,6 @@ AC_CHECK_DECLS([basename], [], PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.36) - -if (test "${enable_threads}" = "yes"); then - AC_DEFINE(NEED_THREADS, 1, [Define if threading support is required]) - PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16) - GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" - GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" -fi - PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.10) AC_ARG_WITH([dbusconfdir], AS_HELP_STRING([--with-dbusconfdir=DIR], diff --git a/obexd/src/main.c b/obexd/src/main.c index 6837f0d735f8..51141046ba8e 100644 --- a/obexd/src/main.c +++ b/obexd/src/main.c @@ -285,13 +285,6 @@ int main(int argc, char *argv[]) signal = setup_signalfd(); -#ifdef NEED_THREADS - if (dbus_threads_init_default() == FALSE) { - fprintf(stderr, "Can't init usage of threads\n"); - exit(EXIT_FAILURE); - } -#endif - if (manager_init() == FALSE) { error("manager_init failed"); exit(EXIT_FAILURE); diff --git a/obexd/src/plugin.c b/obexd/src/plugin.c index 14327782ddd9..15df99b7ee89 100644 --- a/obexd/src/plugin.c +++ b/obexd/src/plugin.c @@ -28,12 +28,7 @@ * will crash on exit. This is a bug inside these libraries, but there is * nothing much that can be done about it. One bad example is libebook. */ -#ifdef NEED_THREADS #define PLUGINFLAG (RTLD_NOW | RTLD_NODELETE) -#else -#define PLUGINFLAG (RTLD_NOW) -#endif - #define IS_ENABLED(x) (x) static GSList *plugins = NULL; -- 2.50.0