On Thu, Apr 20, 2023 at 10:11:06AM +0800, Gao Xiang wrote: > Newer glibc such as glibc 2.36 also defines 'struct mount_attr' > in addition to <linux/mount.h>. It will report as below when > compiling with old linux kernel headers (without idmapped mounts, > such as kernel-headers 5.10.134) but with newer glibc (here checked > with glibc 2.36.6): > > [CC] detached_mounts_propagation > In file included from detached_mounts_propagation.c:29: > vfs/missing.h:115:8: error: redefinition of 'struct mount_attr' > 115 | struct mount_attr { > | ^~~~~~~~~~ > In file included from detached_mounts_propagation.c:23: > /usr/include/sys/mount.h:210:8: note: originally defined here > 210 | struct mount_attr > | ^~~~~~~~~~ > gmake[3]: *** [Makefile:102: detached_mounts_propagation] Error 1 > gmake[2]: *** [include/buildrules:31: src] Error 2 > make[1]: *** [Makefile:51: default] Error 2 > make: *** [Makefile:49: default] Error 2 > > Let's get rid of <linux/mount.h> as Christian suggested to avoid > potential incompatibility between these two headers. > > Cc: Christian Brauner <brauner@xxxxxxxxxx> > Cc: "Yang Xu (Fujitsu)" <xuyang2018.jy@xxxxxxxxxxx> > Signed-off-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx> > --- Seems good to me, Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>