diff options
author | Peter Wu <peter@lekensteyn.nl> | 2017-12-24 12:59:47 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-12-24 20:22:58 +0000 |
commit | bad83f249fa583e1f26224a9bd7b557f6d790c08 (patch) | |
tree | 076737f25d36b118a1d0377f9d1699281fbef47e /wsutil/glib-compat.h | |
parent | 8642d72f36239267c474ef096252dc64ac6fd710 (diff) |
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>
Diffstat (limited to 'wsutil/glib-compat.h')
-rw-r--r-- | wsutil/glib-compat.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/wsutil/glib-compat.h b/wsutil/glib-compat.h index 3110ad5146..8393e91232 100644 --- a/wsutil/glib-compat.h +++ b/wsutil/glib-compat.h @@ -28,7 +28,6 @@ WS_DLL_PUBLIC GPtrArray* g_ptr_array_new_full(guint reserved_size, GDestroyNotif WS_DLL_PUBLIC gpointer g_async_queue_timeout_pop(GAsyncQueue *queue, guint64 timeout); #endif /* !GLIB_CHECK_VERSION(2,31,18) */ -// joinable = TRUE, error = NULL #if !GLIB_CHECK_VERSION(2,31,0) WS_DLL_PUBLIC GThread *g_thread_new (const gchar *name, GThreadFunc func, gpointer data); #endif /* !GLIB_CHECK_VERSION(2,31,0) */ |