From nobody Sun May 19 00:47:36 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=1571224959; cv=none; d=zoho.com; s=zohoarc; b=Pc6tBtZLOgwvGxRMBCyH86xdM2nuUoIm2Gv6W9h4IbqF6PhY6ybF6+KO2h7i5yui7YBnd0Z/dCdo4BXodJtcVvXnvUOsRXT/57ivHTQPavee3qfXb4CzKPwSwyk8F+hyarxubdXfJgjDsJGnfgP1Y0kdnxn/iv9W2UA+6uMeE7Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571224959; 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=ZSHTfRMvx7Wc5Ug4xfwmuMVUEpUjs71tYxoGxWXEMA4gCy2G/sRMJ2Vscq2PCZ5O10DnZ8JYb1RdyKkmmv7UDMCRjAHIZ8LMOc5UOsjnTE0LdjGyaXwW+ziLUi4Bb+fIYGyHvoaUqIam4visJ0xqEsj6V00Mxcrd7ZTdVXDMtrM= 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 1571224959985393.90718077288943; Wed, 16 Oct 2019 04:22:39 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D2BC030860DA; Wed, 16 Oct 2019 11:22:36 +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 A6A4419C70; Wed, 16 Oct 2019 11:22:36 +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 6057E180B536; Wed, 16 Oct 2019 11:22:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9GBMYra017598 for ; Wed, 16 Oct 2019 07:22:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id BC691413A; Wed, 16 Oct 2019 11:22:34 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B135A5D9E5 for ; Wed, 16 Oct 2019 11:22:30 +0000 (UTC) Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (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 A93472F366C for ; Wed, 16 Oct 2019 11:22:30 +0000 (UTC) Received: by mail-qk1-f200.google.com with SMTP id s3so23366406qkd.6 for ; Wed, 16 Oct 2019 04:22:30 -0700 (PDT) Received: from casantos.remote.csb ([177.18.186.31]) by smtp.gmail.com with ESMTPSA id i30sm13348211qte.27.2019.10.16.04.22.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2019 04:22:29 -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=nYAex8jsffeOYumztax+HJYDO6qYXr87LhD0f6U4l2B+y+iktjklh5p3xZNDLZ8Jww i+5BF6pYOP7PZYv+zsYs4V9W+YL4VarmAtugMFtFitcmNybCXu5KAd+pVc1xk0/Kb2LB jIXz4Bv4fE1vEv22jrEYyfb3l0UMCeCmb6BAJvFRI+uIoODlMgdvXb96VzFVMakagNym yDkPNlAMOYzklsWNYn2q79FNqUZ1Xpjguvp52Gn9L8HYVD9oa6mgi5MkN5SOcLSzWGYQ w0qqLvEeUrP74DG5DPv0wqbG3JtTKSaHR+lq7OnsdjWRC++WD4xEgoeg98cZNN1y8JeW FTqA== X-Gm-Message-State: APjAAAVOEPaM14G0aUYweIh1JNLgXiWH8vBwwEB7Uxeae/f47BYAtZLe 6Sasc1tB98KV5Q/8xf3TLbGvqAAhdNbfWbE4h/MIaAPsknI3HeJZrP7Z5tR2Icl8SgEHSwMkuWo VSOEnd3YF/ZIaLqAUrfE= X-Received: by 2002:a37:4ed1:: with SMTP id c200mr3284916qkb.304.1571224949723; Wed, 16 Oct 2019 04:22:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyS3uRwoBkN91Bz/xBxTdTfVqWVUfBVUdJuIbRzm9QTJ8D4DgiTfbwMt2PXPk0Llr6i66JGwQ== X-Received: by 2002:a37:4ed1:: with SMTP id c200mr3284899qkb.304.1571224949406; Wed, 16 Oct 2019 04:22:29 -0700 (PDT) From: casantos@redhat.com To: libvir-list@redhat.com Date: Wed, 16 Oct 2019 08:22:13 -0300 Message-Id: <20191016112214.25367-2-casantos@redhat.com> In-Reply-To: <20191016112214.25367-1-casantos@redhat.com> References: <20191016112214.25367-1-casantos@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com 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.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Wed, 16 Oct 2019 11:22:37 +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 Reviewed-by: Michal Privoznik --- 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 Sun May 19 00:47:36 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=1571224961; cv=none; d=zoho.com; s=zohoarc; b=Rl+pA8lfvQ6JPvWJIw4CZSDVbeqPSkHmL9p+vFQ2xJkn8SfRhhyTvjkGpZ4+RR5BJ6cdGwRtc0P4E0zGSp4nbUB1SgIhyo8rPi3YzhJfnMX64bUAfs0OlA+imGYRQimpS2cae7lvQ617gUTLEUJ1uVD1uG50zZBSkhjomMMm+dk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571224961; 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=JrujclwRnjlokrmXuCStTzHtd0sahf8I+xd880QCepI4/8JsZItEAklR9Z4PRS7JcYsGAslNRKn7Mgjqyq/C5Vq5DzV1zTarG3xtEGCefBaauTS+M0K8XjzK39pjDSRr61udjoASfxH2cEMtDbcL7VV0CaG7aEjn1bMn0+8/2Sw= 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 1571224961103932.7305952413194; Wed, 16 Oct 2019 04:22:41 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 2BBB351EF8; Wed, 16 Oct 2019 11:22:39 +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 E74F360C83; Wed, 16 Oct 2019 11:22: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 A3683180B536; Wed, 16 Oct 2019 11:22:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9GBMbmd017609 for ; Wed, 16 Oct 2019 07:22:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1E4AE60BC0; Wed, 16 Oct 2019 11:22:37 +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 117D16031F for ; Wed, 16 Oct 2019 11:22:32 +0000 (UTC) Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.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 CD93A3A206 for ; Wed, 16 Oct 2019 11:22:32 +0000 (UTC) Received: by mail-qt1-f199.google.com with SMTP id n4so24573353qtp.19 for ; Wed, 16 Oct 2019 04:22:32 -0700 (PDT) Received: from casantos.remote.csb ([177.18.186.31]) by smtp.gmail.com with ESMTPSA id i30sm13348211qte.27.2019.10.16.04.22.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2019 04:22:31 -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=TgxHSLjSb5STfhRyBJnHY2Vetz2bfKKeAvUPhV9aFYZX0JxexicaBOWT+sP+cQCqgA 1Y+Pb5Q9v3e5HZ/MCiM7fS0TMixfCbYMoZi2cLuuV3/f1i7B7NgBNfi6IMOYnF6pcs9b QgXxfcpdxsD4996G+E9S7NFKf1IkNYTBBJmlahFixqVpnRud004qHzV/4gmAsSFA7gqn 1ZpW0aAHoFv9hXJSZldJNBmG+H1O8gK3L3ydSpoQLQsQooPZ0GwI04RH2ExojRbOeZka O4UpuDvFc18z4yU2f5RRO/mGrqxXjAZNuRQ7iEVxPk+N1ofh8i6vX+FibiRSFcpva2U3 R+og== X-Gm-Message-State: APjAAAVBD8cUwWSrzHKWVkDNRRDeB3io1wR/2XcGZBL0clqXVy7h/Fjy xJPag0dFudcsFOrDnQxsTTenoQ4ZnkH0kqoNAvNg0JCxe7keqW7D7/LRHNN3sw+iHjlYi1ZR2hE oMAC4ndIe3DfWRpu4Sp0= X-Received: by 2002:a05:620a:99c:: with SMTP id x28mr1675263qkx.480.1571224951789; Wed, 16 Oct 2019 04:22:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOcW6NXah0o+T9n1qK/8f0nbpdv+ERJ4Aj5TS118CYc0vJ9x/kONCX7QRfiJ2nhHLJqCSvMw== X-Received: by 2002:a05:620a:99c:: with SMTP id x28mr1675245qkx.480.1571224951552; Wed, 16 Oct 2019 04:22:31 -0700 (PDT) From: casantos@redhat.com To: libvir-list@redhat.com Date: Wed, 16 Oct 2019 08:22:14 -0300 Message-Id: <20191016112214.25367-3-casantos@redhat.com> In-Reply-To: <20191016112214.25367-1-casantos@redhat.com> References: <20191016112214.25367-1-casantos@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 16 Oct 2019 11:22:39 +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 Reviewed-by: Michal Privoznik --- 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