Initialize the glib thread system on all platforms, not only on Windows.
authortuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 12 May 2011 18:55:24 +0000 (18:55 +0000)
committertuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 12 May 2011 18:55:24 +0000 (18:55 +0000)
This requires to be linked against a different library. This is only
required for dumpcap, but the configure files currently doesn't check
this in a target specific way. So use these libs for all binaries.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37095 f5534014-38df-0310-8fa8-9805f1628bb7

configure.in
dumpcap.c

index 00500ec78542286f6ad06ae8832a4b923b1e56fe..3aab467d2a6f176d3e149083a097dbfdbbf0ea12 100644 (file)
@@ -829,7 +829,7 @@ if test "$GTK_OK" = "no" ; then
        [
                CFLAGS="$CFLAGS $GLIB_CFLAGS"
                CXXFLAGS="$CXXFLAGS $GLIB_CFLAGS"
-       ], AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gmodule)
+       ], AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gthread)
 else
        #
        # We have GTK+, and thus will be building Wireshark unless the
@@ -839,7 +839,7 @@ else
        wireshark_man="wireshark.1"
         wireshark_SUBDIRS="codecs gtk"
        # Don't use GLIB_CFLAGS
-       AM_PATH_GLIB_2_0(2.4.0, , AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gmodule)
+       AM_PATH_GLIB_2_0(2.4.0, , AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gthread)
 fi
 
 #
index 90d15d389ceeebc1ccc94d1a44f7201f5a228241..cbd93d25c2fd2385ce7ebdcc6324b15a9b38fa5a 100644 (file)
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -3484,6 +3484,9 @@ main(int argc, char *argv[])
                       log_flags,
                       console_log_handler, NULL /* user_data */);
 
+    /* Initialize the thread system */
+    if (!g_thread_supported())
+        g_thread_init(NULL);
 #ifdef _WIN32
     /* Load wpcap if possible. Do this before collecting the run-time version information */
     load_wpcap();
@@ -3499,8 +3502,6 @@ main(int argc, char *argv[])
     SetConsoleCtrlHandler(capture_cleanup_handler, TRUE);
 
     /* Prepare to read from a pipe */
-    if (!g_thread_supported ())
-        g_thread_init (NULL);
     cap_pipe_pending_q = g_async_queue_new();
     cap_pipe_done_q = g_async_queue_new();
     cap_pipe_read_mtx = g_mutex_new();