From nobody Sun Dec 14 22:11:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1578331799; cv=none; d=zohomail.com; s=zohoarc; b=OxyJHq75hIznB6Neqpa5QR1WXGA2LzfG4aYiHkAtd6iKPTsFP2DWqw697fPmTTxavxq/rF95XsYiaNY7Z4u5AXXvlVI6gSCLRXgA39wHWqajcDa0oygSfaGRd0EPaR58G0yKIoO+7aaECRGcniB1lqRlYVt7AV7D+/TCv85hD+I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578331799; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=s4ZbTbITOWBHheT9yfWDjunuYo4ndGrXA7jGUyEiP+4=; b=GnznZ6X6BU+9qy3mx/F/ZV07mFd7pHYhXlhqJk6dLikK2IVS/24Yi9BGkKnW62EJ6QiSPWP0d9Xja7ClBLyEXAKYs3xy8T1r2rjuBAX5OfIDVJB7W/IteF5yXFJo5fSIsbzhd4SggtgPtWdA6AL5UOh5Qz8Bxt4Tjt1gHx3Z6wQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1578331799435767.0957818237714; Mon, 6 Jan 2020 09:29:59 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-245-N5tx1c95NHSNwOuYpP8UvQ-1; Mon, 06 Jan 2020 12:29:56 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F1815107B7D5; Mon, 6 Jan 2020 17:29:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C69AC10840FD; Mon, 6 Jan 2020 17:29:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 744F418089CF; Mon, 6 Jan 2020 17:29:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 006HTVIl022134 for ; Mon, 6 Jan 2020 12:29:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6E421858B5; Mon, 6 Jan 2020 17:29:31 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (dhcp-43.gsslab.fab.redhat.com [10.33.9.43]) by smtp.corp.redhat.com (Postfix) with ESMTP id D1E3D858AB; Mon, 6 Jan 2020 17:29:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578331798; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=s4ZbTbITOWBHheT9yfWDjunuYo4ndGrXA7jGUyEiP+4=; b=Tk1G2/JBG4lxJoFofwXZACF5ydEFpabKjU95AmkrWDIPgcrXMX2pjptuIak6P7Y21TGe4g wdgWqEjtei/S14SB/L1oU0BgX66pq3dwwXLlxk4vOlaWxVKd1XIlf1E/zW9/porMk/skJq 7ws99ICL2siW2XBwFjtmYAd74cY7WB4= From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Mon, 6 Jan 2020 17:26:49 +0000 Message-Id: <20200106172655.1946234-2-berrange@redhat.com> In-Reply-To: <20200106172655.1946234-1-berrange@redhat.com> References: <20200106172655.1946234-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/7] util: always replace g_fsync usage with our wrapper X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: N5tx1c95NHSNwOuYpP8UvQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) g_fsync was introduced in 2.63 which is newer than our minimum glib version. A future commit will introduce compile time checking of API versions to prevent accidental usage of APIs from glib newer than our min declared. To avoid triggering this warning, however, we need to ensure that we always use our wrapper function via glibcompat.c, which will disable the API version warnings. Signed-off-by: Daniel P. Berrang=C3=A9 --- src/util/glibcompat.c | 1 + src/util/glibcompat.h | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/glibcompat.c b/src/util/glibcompat.c index 4ebefb4478..9fba54cb79 100644 --- a/src/util/glibcompat.c +++ b/src/util/glibcompat.c @@ -55,6 +55,7 @@ vir_g_strdup_vprintf(const char *msg, va_list args) } =20 =20 +/* Drop when min glib >=3D 2.63.0 */ gint vir_g_fsync(gint fd) { diff --git a/src/util/glibcompat.h b/src/util/glibcompat.h index d6b83f4b93..7878ad24ed 100644 --- a/src/util/glibcompat.h +++ b/src/util/glibcompat.h @@ -32,6 +32,5 @@ gint vir_g_fsync(gint fd); # define g_strdup_vprintf vir_g_strdup_vprintf #endif =20 -#if !GLIB_CHECK_VERSION(2, 63, 0) -# define g_fsync vir_g_fsync -#endif +#undef g_fsync +#define g_fsync vir_g_fsync --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list