]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: don't include mount-api-utils.h everywhere
authorKarel Zak <kzak@redhat.com>
Thu, 20 Apr 2023 10:36:41 +0000 (12:36 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 20 Apr 2023 10:36:41 +0000 (12:36 +0200)
Let's keep the file included only when the new kernel API is
necessary.

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/hook_idmap.c
libmount/src/hook_mount.c
libmount/src/hook_subdir.c
libmount/src/mountP.h
libmount/src/optlist.c

index 97808f32bb070d2cbac3eecf6ba0167cc3dde725..affd8fb1443da860ff08298aacf17fcae6c6c88b 100644 (file)
 #include <stdbool.h>
 #include <sys/socket.h>
 #include <sys/wait.h>
+#include <sys/ioctl.h>
+#include <sys/mount.h>
 #include <inttypes.h>
 
-#include "mountP.h"
 #include "strutils.h"
 #include "all-io.h"
 #include "namespace.h"
+#include "mount-api-utils.h"
+
+#include "mountP.h"
 
 #ifdef HAVE_LINUX_NSFS_H
 # include <linux/nsfs.h>
index 117150dec284c525be2aafe2d43f2627114f4247..7fcf3f3f8439c9f0a4590861eb1f9441709be2e3 100644 (file)
@@ -45,6 +45,8 @@
 
 #include "mountP.h"
 #include "fileutils.h" /* statx() fallback */
+#include "mount-api-utils.h"
+
 #include <inttypes.h>
 
 #ifdef USE_LIBMOUNT_MOUNTFD_SUPPORT
index 77b073a69556d5f317edc74379b971bcd3c3a1fc..85b39465cd373f7f2805827d9a10172e1d3917f8 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "mountP.h"
 #include "fileutils.h"
+#include "mount-api-utils.h"
 
 static int tmptgt_cleanup(int old_ns_fd);
 
index bceb04a92bb17ba47ae09197af1ad994421bb093..d7ae6b7d2d50c26649ef6f5aaef03a2c78f6f740 100644 (file)
@@ -29,7 +29,6 @@
 #include "debug.h"
 #include "buffer.h"
 #include "libmount.h"
-#include "mount-api-utils.h"
 
 /*
  * Debug
index e6adc0c66801799e20f2585e9595d16df0bc87af..a8c1ad89a69931f2dff25d925cb06e67abafea25 100644 (file)
@@ -16,6 +16,7 @@
 #include "strutils.h"
 #include "list.h"
 #include "mountP.h"
+#include "mount-api-utils.h"
 
 #define MNT_OL_MAXMAPS 8