forked from pool/libvirt
41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
|
From 16476d6d80085649c1bc9ff2eb31b9effb5d45ef Mon Sep 17 00:00:00 2001
|
||
|
From: Cole Robinson <crobinso@redhat.com>
|
||
|
Date: Mon, 1 Aug 2022 15:24:01 -0400
|
||
|
Subject: [PATCH 2/2] 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 <eskultet@redhat.com>
|
||
|
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||
|
(cherry picked from commit c0d9adf220dc0d223330a7bac37b174132d330ba)
|
||
|
---
|
||
|
src/util/virfile.c | 6 +++++-
|
||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||
|
|
||
|
Index: libvirt-8.6.0/src/util/virfile.c
|
||
|
===================================================================
|
||
|
--- libvirt-8.6.0.orig/src/util/virfile.c
|
||
|
+++ libvirt-8.6.0/src/util/virfile.c
|
||
|
@@ -71,7 +71,11 @@
|
||
|
# endif
|
||
|
# include <sys/ioctl.h>
|
||
|
# include <linux/cdrom.h>
|
||
|
-# include <linux/fs.h>
|
||
|
+/* 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
|