From nobody Thu May 9 01:37:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1571234800; cv=none; d=zoho.com; s=zohoarc; b=ROnWaWl3hxGqXBJSp/u88exRgN5KaFlTVaeo3LHd0XY49lY1JyaYBWrMnDusbjssfi2S2WQ7yIg44p4JrEDs03J218t54AAkiRCV+VBTvF52L+yurdyqKBxUOyvDlB1RYA2KTWY6VOK2QT2a8fMJNsbqxvy/um8uYHIvLbRiJ5Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571234800; h=Content-Type:Content-Transfer-Encoding:Cc: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=JAdKHxpQtSTRoaIwrjti6sQtp63Y7zSp4kfX4UTtnxA=; b=FU//hOhOSY6oNdq7J3H8iXp+9hRZc8Zh40S0DhuKGY3Eoz6iJ1iz1umq3ew7izLdQZ7SM62XUuD+is7NaxyBkR/KbW0PKytpBFcsk7BdgSDyGbsOIOMJJtZ2AzdgGFk06Hx8G4N8mQjj7v8fv5WfIskJcc/MwPnH4wxkD+FBRo8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 157123480022929.30263543268211; Wed, 16 Oct 2019 07:06:40 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 390DAC05AA64; Wed, 16 Oct 2019 14:06:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0DF36100164D; Wed, 16 Oct 2019 14:06:38 +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 BB0784EE6E; Wed, 16 Oct 2019 14:06:37 +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 x9G1b4jo022985 for ; Tue, 15 Oct 2019 21:37:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 036A860852; Wed, 16 Oct 2019 01:37:04 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F0F0360920 for ; Wed, 16 Oct 2019 01:37:01 +0000 (UTC) Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 94937C053B34 for ; Wed, 16 Oct 2019 01:37:01 +0000 (UTC) Received: by mail-qk1-f199.google.com with SMTP id x62so22178826qkb.7 for ; Tue, 15 Oct 2019 18:37:01 -0700 (PDT) Received: from casantos.remote.csb ([177.18.186.31]) by smtp.gmail.com with ESMTPSA id h68sm10748385qkf.2.2019.10.15.18.36.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 18:37:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iC/sHKOoJjyuGOTsjMghdG2cUbjESli1iw5YW7o0bzo=; b=ezX7AK7zFHMWaLRFT4VQbWff+XH9d4I9/IXg34uWKIUANLwRhwJEnEyfafIzCwYbs2 D1bgmH5r16wkhxWmmhCNd1/t//NXc76GIsFmo7HzTwKaW89EmM1diPbP+Mk9bNutcqO8 4Shn8Eg435WTpNQMwMzYr/OooLB/42s4VuyldccuyQp1jG8g1PF87PFObDPLlqSaWNWb BNl2yfupO/h1f3gXLpHGaNbe0dTF+Lgns2Slbza6WOQpYII33beIf/8Dem21QwxBQNXT EnvNX0G/GzX/agKGVow/UHaOIJF5x1geiBJIgz8g/vR9VrfiemHBo4SqW7PYF2mh2juI q3JA== X-Gm-Message-State: APjAAAW7W+WZ9E+9oBLPjwHLp5UUfib7vDYq0VAJCzVFPAir78MbHqAN lnzufsEwzHCiHw/niIRNMVa7os31otc7EcWZdYRGx4Gm7qDC1q2qwL7NqKw1QYWm+ewJFo+btnW Xh2EDbiRa6vxLMLWqAg0= X-Received: by 2002:a05:6214:43:: with SMTP id c3mr40226509qvr.203.1571189820692; Tue, 15 Oct 2019 18:37:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqyeok5L7lHJyFjFVCaFWtcOZ71T1eVckgaRsoo3a01k6mR7EZipI63hcOzOkDKBVNIGPWWjgw== X-Received: by 2002:a05:6214:43:: with SMTP id c3mr40226495qvr.203.1571189820400; Tue, 15 Oct 2019 18:37:00 -0700 (PDT) From: casantos@redhat.com To: libvir-list@redhat.com Date: Tue, 15 Oct 2019 22:36:45 -0300 Message-Id: <20191016013646.3030-2-casantos@redhat.com> In-Reply-To: <20191016013646.3030-1-casantos@redhat.com> References: <20191016013646.3030-1-casantos@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Wed, 16 Oct 2019 10:06:30 -0400 Cc: Carlos Santos Subject: [libvirt] [PATCH 1/2] qemu: fix build with musl libc 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 16 Oct 2019 14:06:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" From: Carlos Santos On musl libc "stderr" is a preprocessor macro whose expansion leads to compilation errors: In file included from qemu/qemu_process.c:66: qemu/qemu_process.c: In function 'qemuProcessQMPFree': qemu/qemu_process.c:8418:21: error: expected identifier before '(' token VIR_FREE((proc->stderr)); ^~~~~~ Prevent this by renaming the homonymous field in the _qemuProcessQMP struct to "stdErr". Signed-off-by: Carlos Santos --- src/qemu/qemu_process.c | 8 ++++---- src/qemu/qemu_process.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 9c50c4a1d8..e7a8d74455 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -8448,7 +8448,7 @@ qemuProcessQMPFree(qemuProcessQMPPtr proc) VIR_FREE(proc->monpath); VIR_FREE(proc->monarg); VIR_FREE(proc->pidfile); - VIR_FREE(proc->stderr); + VIR_FREE(proc->stdErr); VIR_FREE(proc); } =20 @@ -8601,7 +8601,7 @@ qemuProcessQMPLaunch(qemuProcessQMPPtr proc) virCommandSetGID(proc->cmd, proc->runGid); virCommandSetUID(proc->cmd, proc->runUid); =20 - virCommandSetErrorBuffer(proc->cmd, &(proc->stderr)); + virCommandSetErrorBuffer(proc->cmd, &(proc->stdErr)); =20 if (virCommandRun(proc->cmd, &status) < 0) goto cleanup; @@ -8611,7 +8611,7 @@ qemuProcessQMPLaunch(qemuProcessQMPPtr proc) virReportError(VIR_ERR_INTERNAL_ERROR, _("Failed to start QEMU binary %s for probing: %s"), proc->binary, - proc->stderr ? proc->stderr : _("unknown error")); + proc->stdErr ? proc->stdErr : _("unknown error")); goto cleanup; } =20 @@ -8690,7 +8690,7 @@ qemuProcessQMPConnectMonitor(qemuProcessQMPPtr proc) * ** Send QMP Queries to QEMU using monitor (proc->mon) ** * qemuProcessQMPFree(proc); * - * Process error output (proc->stderr) remains available in qemuProcessQMP + * Process error output (proc->stdErr) remains available in qemuProcessQMP * struct until qemuProcessQMPFree is called. */ int diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h index 1d62319092..9af9f967fd 100644 --- a/src/qemu/qemu_process.h +++ b/src/qemu/qemu_process.h @@ -212,7 +212,7 @@ struct _qemuProcessQMP { char *libDir; uid_t runUid; gid_t runGid; - char *stderr; + char *stdErr; char *monarg; char *monpath; char *pidfile; --=20 2.18.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 9 01:37:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1571234793; cv=none; d=zoho.com; s=zohoarc; b=kH2Td7vfjyz+LJuhbB6irU5aDBWKp2UaVdmCxgP2DWpXhi7Fv/uiaTsfqNreRgGC7YrHX0GS9yElvoZT53xcAWQXYuZEH7xnkDSyUih2iKopNBFq4VEfatcFnT3d33gm6fktos63BX6tBj4rkRdwaFpu+7J0GJrMmZua+C6uoF8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571234793; h=Content-Type:Content-Transfer-Encoding:Cc: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=vFTXonSUbx1fhIiyXut++OTP4DDH3padmisGUkSlgw4=; b=gu5qs9ducDV0Ldmr8tr7WAzLM4w3IzVatatO+Jc0J1eD0m82HOoGWk8zOHRQeqQ+sIdvjIu0mwVgtBG1BLLFpEbB2qGTVDbWPpv7ynV/fA7Vic/5oujAKiJaTB9TjJdSdB8l4TJgfJQXK6IibPV+6l18xLxddCBpMYGWzJOiz4M= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1571234793587708.2619151681988; Wed, 16 Oct 2019 07:06:33 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DACB2307D96D; Wed, 16 Oct 2019 14:06:31 +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 B67F25F7C0; Wed, 16 Oct 2019 14:06:31 +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 703FC1803518; Wed, 16 Oct 2019 14:06:31 +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 x9G1b4Cv022984 for ; Tue, 15 Oct 2019 21:37:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0171B60A97; Wed, 16 Oct 2019 01:37:04 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE4FE60852 for ; Wed, 16 Oct 2019 01:37:03 +0000 (UTC) Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6FB992A09BA for ; Wed, 16 Oct 2019 01:37:03 +0000 (UTC) Received: by mail-qk1-f199.google.com with SMTP id r17so22120957qkm.16 for ; Tue, 15 Oct 2019 18:37:03 -0700 (PDT) Received: from casantos.remote.csb ([177.18.186.31]) by smtp.gmail.com with ESMTPSA id h68sm10748385qkf.2.2019.10.15.18.37.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 18:37:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=25NfDKuLFHAgNvLLkyzfK1pIazviLTRxRGq+eCwe0Hw=; b=EiKmX7g4Z7aLXSQR793pP8Wh9KSy5kJp9qD6mR72CSYXdhHV9xdlf1+bYzWFHHBWaS 2zt62e8hcCKGve0b4Xx0Blv13Vra1NFKu08u+/XAKsgwtMxv9/ZyI+wpdSijee35P3oF //w94Ori8PYzx8HGovvr2mQ/ZgvgBDoPX/z4Hz3yqUn/9hp+4bGZvcPAj1TuLD2BdcBR tQNpT2iP4Xg5gKAfhLhr6TVZkLp6kKkbi36VRuFmDRiuTMSnAyfHaqpei3ETKkxYvXyX VHOd2XhCkhwFCVXZQflXVvYTxVH+OQSaiLBepk//skl/7rop+7Tlc95dnd5tbnuxsmOe LL7w== X-Gm-Message-State: APjAAAUFrouNrKmgWT9ba1CnVkQEhbaWPulUN4GdtiA+L24+PPJtFcaY 2mr1WpjVyppFZVS4hVP4DsA1eBfNVUVcYXZTQCDpKykTYTonjrHYdf7vi0nv8W2bBOMWvaWl+2Y 6Tgy7DwIdZLk5OihDb/Y= X-Received: by 2002:a05:620a:164e:: with SMTP id c14mr8377845qko.327.1571189822600; Tue, 15 Oct 2019 18:37:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqw87DOe3385VXzcOf1qbhmFWYzog5cfl2cp8VjacHETaSxXGXR8/W9RqE7R95oh6SXD5Gl6oQ== X-Received: by 2002:a05:620a:164e:: with SMTP id c14mr8377834qko.327.1571189822349; Tue, 15 Oct 2019 18:37:02 -0700 (PDT) From: casantos@redhat.com To: libvir-list@redhat.com Date: Tue, 15 Oct 2019 22:36:46 -0300 Message-Id: <20191016013646.3030-3-casantos@redhat.com> In-Reply-To: <20191016013646.3030-1-casantos@redhat.com> References: <20191016013646.3030-1-casantos@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Wed, 16 Oct 2019 10:06:30 -0400 Cc: Carlos Santos Subject: [libvirt] [PATCH 2/2] storage: fix build with musl libc 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 16 Oct 2019 14:06:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" From: Carlos Santos On musl _PATH_MOUNTED is defined in paths.h, not in mntent.h, which causes compilation errors: storage/storage_backend_fs.c: In function 'virStorageBackendFileSystemIsMou= nted': storage/storage_backend_fs.c:255:23: error: '_PATH_MOUNTED' undeclared (fir= st use in this function); did you mean 'XPATH_POINT'? if ((mtab =3D fopen(_PATH_MOUNTED, "r")) =3D=3D NULL) { ^~~~~~~~~~~~~ XPATH_POINT Fix this including paths.h if _PATH_MOUNTED is still not defined after including mntent.h. This also works with glibc and uClibc-ng. Signed-off-by: Carlos Santos --- src/storage/storage_backend_fs.c | 3 +++ src/storage/storage_backend_vstorage.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend= _fs.c index ed677058ed..fafe2745cc 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -42,6 +42,9 @@ VIR_LOG_INIT("storage.storage_backend_fs"); #if WITH_STORAGE_FS =20 # include +#ifndef _PATH_MOUNTED +# include +#endif =20 struct _virNetfsDiscoverState { const char *host; diff --git a/src/storage/storage_backend_vstorage.c b/src/storage/storage_b= ackend_vstorage.c index cec21dccbf..685f78a22f 100644 --- a/src/storage/storage_backend_vstorage.c +++ b/src/storage/storage_backend_vstorage.c @@ -7,6 +7,9 @@ #include "virlog.h" #include "virstring.h" #include +#ifndef _PATH_MOUNTED +#include +#endif #include #include #include "storage_util.h" --=20 2.18.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list