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=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