From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr5ax-0005lp-5J for qemu-devel@nongnu.org; Tue, 27 Oct 2015 10:51:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zr5at-0004fw-V7 for qemu-devel@nongnu.org; Tue, 27 Oct 2015 10:51:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr5at-0004fl-Q2 for qemu-devel@nongnu.org; Tue, 27 Oct 2015 10:51:23 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 533738E235 for ; Tue, 27 Oct 2015 14:51:23 +0000 (UTC) From: Markus Armbruster Date: Tue, 27 Oct 2015 15:51:21 +0100 Message-Id: <1445957481-21059-1-git-send-email-armbru@redhat.com> In-Reply-To: <1444921716-9511-1-git-send-email-armbru@redhat.com> References: <1444921716-9511-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 4.5/7] glib: add compatibility interface for g_hash_table_add() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: amit.shah@redhat.com, marcandre.lureau@redhat.com The next commit will use it. Signed-off-by: Markus Armbruster --- include/glib-compat.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/glib-compat.h b/include/glib-compat.h index fb25f43..5185630 100644 --- a/include/glib-compat.h +++ b/include/glib-compat.h @@ -165,6 +165,13 @@ static inline GThread *g_thread_new(const char *name, #define CompatGCond GCond #endif /* glib 2.31 */ +#if !GLIB_CHECK_VERSION(2, 32, 0) +static inline gboolean g_hash_table_add (GHashTable *hash_table, gpointer key) +{ + return g_hash_table_replace(hash_table, key, key) +} +#endif + #ifndef g_assert_true #define g_assert_true(expr) \ do { \ -- 2.4.3