diff options
author | Yang Xu <xuyang2018.jy@fujitsu.com> | 2023-04-25 16:21:30 +0800 |
---|---|---|
committer | Zorro Lang <zlang@kernel.org> | 2023-04-29 02:31:04 +0800 |
commit | ea9160e0fcaf463a2339b47ad2cd00c56e806352 (patch) | |
tree | ea4bdcba8db11717a321efcd2e33b8f27c684a03 /common | |
parent | 067acc189b6d19ab6e5e05ab355955b257000e30 (diff) |
src: Don't include <sys/mount.h> and <linux/mount.h> together
Newer glibc such as glibc 2.36 also defines 'struct mount_attr'
in addition to <linux/mount.h>.
Usually we should use glibc header instead of kernel header.
But now mount.h is a special case because both new glibc header and
kernel header all define "struct mount_attr'. They also define MS*
macro.
Since we have some syscall wrapper in vfs/missing.h, we can use
<linux.mount.h> directly instead of <sys/mount.h> for
detached_mounts_propagation.c.
For utils.c, it doesn't use the macro or function in <sys/mount.h>,
so remove it directly.
In fact, newer glibc(2.37-1)[1] has sloved conflict problem between
<sys/mount.h> and <linux/mount.h>. In the future(maybe ten years), we
can remove this kernel header and use glibc header.
[1]https://sourceware.org/git/?p=glibc.git;a=commit;h=774058d72942249f71d74e7f2b639f77184160a6
Acked-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Tested-by: Ziyang Zhang <ZiyangZhang@linux.alibaba.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'common')
0 files changed, 0 insertions, 0 deletions