]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic/include: trivial cleanups for libc header wrapper (#37937)
authorMike Yuan <me@yhndnzj.com>
Fri, 27 Jun 2025 14:03:10 +0000 (16:03 +0200)
committerGitHub <noreply@github.com>
Fri, 27 Jun 2025 14:03:10 +0000 (16:03 +0200)
1  2 
src/basic/include/sys/mount.h

index b28895c9abbf2784aabbdb2f7290a38a9bd5522e,9e7d3d74f1bf6aa44806d2d6cda76d7e690fbcf4..211a552d6a332e3f0be5e26a5de56bd26ad00020
  #include <unistd.h>
  
  #include "missing_fcntl.h"
 -#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
  {