From nobody Wed May 1 22:36:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 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=1573746305; cv=none; d=zoho.com; s=zohoarc; b=DxUzGXllzbiU5xmfSWac4/CVEIg+u02PsHGsDBYu2cyAP++1zsAOWReGtFPhkziZ6tnVCdPCA32YqhuXZXOL6eHIWnrbJdQ4fYMj8PusnVxjFJ5KLzsnTbju0ihZXElt47V/oKb5+5LFxLnAjh2lxnmSggn1HUVu4bBDkImKipE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573746305; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=95lU/Ui76Ua01PfAbts8exNAs21/eFIK+MPNEEK7qwc=; b=dii2fhtVF1lRzlyTeC2O1ugY7dEfkPWEexbiQ2OQGRJxgsSsMPm05TU2CGtPNSet8N4Ft+cFXG1ARG/STuB59oGeI8jEr55ybT97Hdd9EbVOlKVRqqHva2uV2jrqMQZqaEC+U+/USYnsNhI4WAbV4rzE6DPSIOSr6qOsPMuJkCY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1573746305249186.93247458650671; Thu, 14 Nov 2019 07:45:05 -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-404-IEkBui46N22_yfxbH89zRw-1; Thu, 14 Nov 2019 10:45:02 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 196C38EDBCF; Thu, 14 Nov 2019 15:44:57 +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 8919451C3F; Thu, 14 Nov 2019 15:44:55 +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 3E510182B010; Thu, 14 Nov 2019 15:44:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAEFipdk026756 for ; Thu, 14 Nov 2019 10:44:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id 809C31E5; Thu, 14 Nov 2019 15:44:51 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0AC226CE40 for ; Thu, 14 Nov 2019 15:44:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573746304; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=95lU/Ui76Ua01PfAbts8exNAs21/eFIK+MPNEEK7qwc=; b=XFBM6bU6d8Z4lgTj+SQhY1vnJMYSywd4mp1pl8VdYM7r9xAq6aPhW+04LGjIiGuGV/5lmh MH1QL2hIRllpJX3v8s7yEzpXRTezNGArNVUxn1tUjpJOFx37HlzZxvT8svtr9QH60PEpip /VrGjB7+OZPY4xSvpYCwdLKEoLaTxTE= From: Michal Privoznik To: libvir-list@redhat.com Date: Thu, 14 Nov 2019 16:44:38 +0100 Message-Id: <1b0de07f41bbe0d23ab96b604428ae55fd22aec0.1573746265.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] virhostuptime: Wrap virHostGetBootTimeProcfs() call in an ifdef 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.79 on 10.5.11.12 X-MC-Unique: IEkBui46N22_yfxbH89zRw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The virHostGetBootTimeProcfs() function is defined only for Linux and therefore it's only call should also be done if we're on Linux. Signed-off-by: Michal Privoznik --- Pushed under trivial rule. src/util/virhostuptime.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/virhostuptime.c b/src/util/virhostuptime.c index 056b5c591a..8c49c3d40e 100644 --- a/src/util/virhostuptime.c +++ b/src/util/virhostuptime.c @@ -99,8 +99,10 @@ virHostGetBootTimeOnceInit(void) endutxent(); # endif /* HAVE_GETUTXID */ =20 +# ifdef __linux__ if (bootTimeErrno !=3D 0 || bootTime =3D=3D 0) bootTimeErrno =3D -virHostGetBootTimeProcfs(&bootTime); +# endif /* __linux__ */ } =20 #else /* !defined(HAVE_GETUTXID) && !defined(__linux__) */ --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list