From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdfaZ-0000E7-CU for qemu-devel@nongnu.org; Thu, 02 Apr 2015 09:55:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdfaU-0001Cr-AP for qemu-devel@nongnu.org; Thu, 02 Apr 2015 09:55:19 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:35552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdfaU-0001Ch-2k for qemu-devel@nongnu.org; Thu, 02 Apr 2015 09:55:14 -0400 Received: by widdi4 with SMTP id di4so79620563wid.0 for ; Thu, 02 Apr 2015 06:55:13 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <551D4A3E.4060407@redhat.com> Date: Thu, 02 Apr 2015 15:55:10 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20150402151539.00e6ce10.cornelia.huck@de.ibm.com> In-Reply-To: <20150402151539.00e6ce10.cornelia.huck@de.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] glib-compat tales of woe List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , qemu-devel@nongnu.org On 02/04/2015 15:15, Cornelia Huck wrote: > After some updates were applied on our SLES11SP3 development server, > current qemu fails to build: > > In file included from /home/cohuck/git/qemu/include/qemu-common.h:43, > from /home/cohuck/git/qemu/qapi/qapi-visit-core.c:14: > /home/cohuck/git/qemu/include/glib-compat.h:35: error: static declaration of ‘g_get_monotonic_time’ follows non-static declaration > /usr/include/glib-2.0/glib/gmain.h:236: error: previous declaration of ‘g_get_monotonic_time’ was here > > > and so on. > > pkg-config reports a glib-2.0 version of 2.22.5 - but the SLES > development package contains a helpfully backported version of > g_get_monotonic_time, which you wouldn't know from the reported version. > > Question: How do we deal with problems like this? We call our compat wrapper qemu_g_get_monotonic_time and add a helpful #define. Not done so far because nobody ever thought it was necessary. :) Paolo