Fix build and thread runtime compat with older GLib
authorPeter Wu <peter@lekensteyn.nl>
Sun, 24 Dec 2017 11:59:47 +0000 (12:59 +0100)
committerAnders Broman <a.broman58@gmail.com>
Sun, 24 Dec 2017 20:22:58 +0000 (20:22 +0000)
commitbad83f249fa583e1f26224a9bd7b557f6d790c08
tree076737f25d36b118a1d0377f9d1699281fbef47e
parent8642d72f36239267c474ef096252dc64ac6fd710
Fix build and thread runtime compat with older GLib

CentOS 6 ships with glib 2.28.8 which do not support
g_ptr_array_new_full (make-taps/make-dissectors) and need to link with
wsutil for glib-compat.

g_thread_new was only introduced with GLib 2.32 (not 2.31), so adjust
the check accordingly. Abort in case thread creation fails (as
documented). Properly initialize threads or it will abort on runtime
(this also requires linking epan with gthreads in CMake, autotools
already includes it with GLIB_LIBS).

Change-Id: Ie81d6df7b3b26aaa4eb25e23719a220755e2c13c
Reviewed-on: https://code.wireshark.org/review/24978
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
dumpcap.c
epan/CMakeLists.txt
epan/dissectors/CMakeLists.txt
epan/dissectors/packet-tibia.c
epan/epan.c
ui/CMakeLists.txt
wsutil/glib-compat.c
wsutil/glib-compat.h