From patchwork Mon Aug 15 17:17:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 5875 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4M61Fb4pyBz3wfP for ; Mon, 15 Aug 2022 17:18:11 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4M61FS4lbYz5YH; Mon, 15 Aug 2022 17:18:04 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4M61FS1Z4Lz330P; Mon, 15 Aug 2022 17:18:04 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4M61FQ2lfYz2ySx for ; Mon, 15 Aug 2022 17:18:02 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4M61FN5t5Rz5XD; Mon, 15 Aug 2022 17:18:00 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1660583880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y1zPRes56oyktlL5rNWhk0kOhwMd+WSWNbZU94dDyMU=; b=NAi5plLNl3nOPZURkMWVpWHC8Up54Fgoi1/DZhY0RnLlVEVBCIQ5l2YyK/1W4xBcUtrWSH y1c7BCHGi1M19FCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1660583880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y1zPRes56oyktlL5rNWhk0kOhwMd+WSWNbZU94dDyMU=; b=DXNEdwCMJNxmHuRjFnngCNvNug8e0DVbHHJw5vpgW7fKvv8Wlvs+Q1VL/wIfQg6/J+2F15 IT6UsYYrRL4hm+wXPbA5K6x0RBcbB74KO2vJ0EHtJL9tpGLj66Axr6+OmiqituBDTf1gsn T+FHU8i1RgUYqtbsuKtbukcDP1MKIZ+rems3WqOlqCKUFcZuJdsCrDqVQ/vBwf6paudCG4 zrMGtiMxr7k9o1b7by7E5Gs/Ck/EJuXegaI8GFohIYTvP9WeEP6INpJMZEh2WmEk4Ag6Ty RHFSXXGZR0QSRJVfhGWz9UR7DCukaD8a9233nz2SaEVAMKIwg/UUin+eLoZbNg== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 12/15] libvirt: Fix build against glibc 2.36 Date: Mon, 15 Aug 2022 17:17:50 +0000 Message-Id: <20220815171753.1858688-12-michael.tremer@ipfire.org> In-Reply-To: <20220815171753.1858688-1-michael.tremer@ipfire.org> References: <20220815171753.1858688-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- lfs/libvirt | 1 + .../libvirt-7.10.0-fix-glibc-headers.patch | 42 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/patches/libvirt-7.10.0-fix-glibc-headers.patch diff --git a/lfs/libvirt b/lfs/libvirt index 77f75e1d3..d07f19b03 100644 --- a/lfs/libvirt +++ b/lfs/libvirt @@ -83,6 +83,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar Jxf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/libvirt/0001-Change-default-behavior-of-libvirt-guests.sh-for-IPF.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libvirt-7.10.0-fix-glibc-headers.patch cd $(DIR_APP) && meson \ --prefix=/usr \ diff --git a/src/patches/libvirt-7.10.0-fix-glibc-headers.patch b/src/patches/libvirt-7.10.0-fix-glibc-headers.patch new file mode 100644 index 000000000..cfe71d4bd --- /dev/null +++ b/src/patches/libvirt-7.10.0-fix-glibc-headers.patch @@ -0,0 +1,42 @@ +From c0d9adf220dc0d223330a7bac37b174132d330ba Mon Sep 17 00:00:00 2001 +From: Cole Robinson +Date: Mon, 1 Aug 2022 15:24:01 -0400 +Subject: [PATCH] virfile: Fix build with glibc 2.36 + +With glibc 2.36, sys/mount.h and linux/mount.h conflict: +https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E + +virfile.c imports sys/mount.h and linux/fs.h, which pulls in +linux/mount.h. + +Manually define the constants we need from linux/fs.h, like was +done in llvm: + +https://reviews.llvm.org/rGb379129c4beb3f26223288627a1291739f33af02 + +Reviewed-by: Erik Skultety +Signed-off-by: Cole Robinson +--- + src/util/virfile.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/util/virfile.c b/src/util/virfile.c +index 99da058db3..ce541b8946 100644 +--- a/src/util/virfile.c ++++ b/src/util/virfile.c +@@ -71,7 +71,11 @@ + # endif + # include + # include +-# include ++/* These come from linux/fs.h, but that header conflicts with ++ * sys/mount.h on glibc 2.36+ */ ++# define FS_IOC_GETFLAGS _IOR('f', 1, long) ++# define FS_IOC_SETFLAGS _IOW('f', 2, long) ++# define FS_NOCOW_FL 0x00800000 + #endif + + #if WITH_LIBATTR +-- +GitLab +