From patchwork Thu Apr 2 15:17:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 457722 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 21FB81401AF for ; Fri, 3 Apr 2015 02:18:31 +1100 (AEDT) Received: from localhost ([::1]:58863 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ydgt3-0007wP-8V for incoming@patchwork.ozlabs.org; Thu, 02 Apr 2015 11:18:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ydgsc-0007MA-LB for qemu-devel@nongnu.org; Thu, 02 Apr 2015 11:18:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdgsW-0005dy-Tc for qemu-devel@nongnu.org; Thu, 02 Apr 2015 11:18:02 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:42005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdgsW-0005dn-Ge for qemu-devel@nongnu.org; Thu, 02 Apr 2015 11:17:56 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 2 Apr 2015 16:17:55 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 2 Apr 2015 16:17:52 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 463EB17D8062 for ; Thu, 2 Apr 2015 16:18:23 +0100 (BST) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t32FHqhj31457516 for ; Thu, 2 Apr 2015 15:17:52 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t32FHppY018042 for ; Thu, 2 Apr 2015 09:17:51 -0600 Received: from gondolin.boeblingen.de.ibm.com (dyn-9-152-224-143.boeblingen.de.ibm.com [9.152.224.143]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t32FHosK018021; Thu, 2 Apr 2015 09:17:51 -0600 From: Cornelia Huck To: qemu-devel@nongnu.org Date: Thu, 2 Apr 2015 17:17:45 +0200 Message-Id: <1427987865-433-2-git-send-email-cornelia.huck@de.ibm.com> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1427987865-433-1-git-send-email-cornelia.huck@de.ibm.com> References: <1427987865-433-1-git-send-email-cornelia.huck@de.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15040215-0013-0000-0000-000003875F4F X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.109 Cc: Cornelia Huck , peter.maydell@linaro.org, pbonzini@redhat.com Subject: [Qemu-devel] [PATCH for-2.3 1/1] glib-compat: fix problems with not-quite glib 2.22 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Commit 89b516d8b9444ece8ccabb322a9389587c7a7b83 ("glib: add compatibility interface for g_get_monotonic_time()") aimed at making qemu build with old glib versions. At least SLES11SP3, however, contains a backport of g_get_monotonic_time() while keeping the reported glib version at 2.22. Let's work around this by a strategically placed #define. Signed-off-by: Cornelia Huck --- include/glib-compat.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/glib-compat.h b/include/glib-compat.h index f0615c9..011352b 100644 --- a/include/glib-compat.h +++ b/include/glib-compat.h @@ -32,7 +32,7 @@ static inline guint g_timeout_add_seconds(guint interval, GSourceFunc function, #endif #if !GLIB_CHECK_VERSION(2, 28, 0) -static inline gint64 g_get_monotonic_time(void) +static inline gint64 qemu_g_get_monotonic_time(void) { /* g_get_monotonic_time() is best-effort so we can use the wall clock as a * fallback. @@ -43,6 +43,8 @@ static inline gint64 g_get_monotonic_time(void) return time.tv_sec * G_TIME_SPAN_SECOND + time.tv_usec; } +/* work around distro backports of this interface */ +#define g_get_monotonic_time() qemu_g_get_monotonic_time() #endif #if !GLIB_CHECK_VERSION(2, 16, 0)