From nobody Sun Feb 8 16:31:03 2026 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 --- 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