basic: introduce our own sys/mount.h implementation
To resolve conflict with sys/mount.h and linux/mount.h or linux/fs.h. The conflict between sys/mount.h and linux/mount.h is resolved in glibc-2.37 (774058d72942249f71d74e7f2b639f77184160a6), but our baseline is still glibc-2.31. Also, even with the version or newer, still sys/mount.h conflicts with linux/fs.h, which is included by linux/btrfs.h. This introduces our own implementation of sys/mount.h, that can be simultaneously included with linux/mount.h and linux/fs.h. This also imports linux/fs.h, linux/mount.h, and several other dependent headers. The introduced sys/mount.h header itself may not be enough simple, but by using the header, we can drop most of workarounds in other source files.
This commit is contained in:
@@ -14,8 +14,6 @@
|
||||
#include <unistd.h>
|
||||
#include <utmpx.h>
|
||||
|
||||
#include <linux/fs.h> /* Must be included after <sys/mount.h> */
|
||||
|
||||
#include "sd-messages.h"
|
||||
|
||||
#include "af-list.h"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/oom.h>
|
||||
#include <sched.h>
|
||||
#include <sys/resource.h>
|
||||
@@ -48,6 +47,7 @@
|
||||
#include "limits-util.h"
|
||||
#include "load-fragment.h"
|
||||
#include "log.h"
|
||||
#include "missing_fs.h"
|
||||
#include "mountpoint-util.h"
|
||||
#include "nulstr-util.h"
|
||||
#include "open-file.h"
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
#include <sys/file.h>
|
||||
#include <sys/mount.h>
|
||||
#include <unistd.h>
|
||||
#if WANT_LINUX_FS_H
|
||||
#include <linux/fs.h>
|
||||
#endif
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "base-filesystem.h"
|
||||
|
||||
Reference in New Issue
Block a user