From: Yu Watanabe Date: Mon, 23 Jun 2025 06:43:04 +0000 (+0900) Subject: include: add comment why our sys/mount.h does not include the one by glibc X-Git-Tag: v258-rc1~235^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F37937%2Fhead;p=thirdparty%2Fsystemd.git include: add comment why our sys/mount.h does not include the one by glibc --- diff --git a/src/basic/include/sys/mount.h b/src/basic/include/sys/mount.h index c79160aff47..9e7d3d74f1b 100644 --- a/src/basic/include/sys/mount.h +++ b/src/basic/include/sys/mount.h @@ -13,6 +13,12 @@ #include "missing_fs.h" #include "missing_syscall_def.h" +/* Since glibc-2.37 (774058d72942249f71d74e7f2b639f77184160a6), sys/mount.h includes linux/mount.h, and + * we can safely include both headers in the same source file. However, we cannot do that with older glibc. + * To avoid conflicts, let's not use glibc's sys/mount.h, and provide our own minimal implementation. + * Fortunately, most of definitions we need are covered by linux/fs.h and linux/mount.h, so only one enum + * and a few function prototypes need to be defined here. */ + /* Possible value for FLAGS parameter of `umount2'. */ enum {