aboutgitcodebugslistschat
path: root/linux_dep.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux_dep.h')
-rw-r--r--linux_dep.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/linux_dep.h b/linux_dep.h
index fa539ce..57ebc0d 100644
--- a/linux_dep.h
+++ b/linux_dep.h
@@ -138,6 +138,36 @@ struct tcp_info_linux {
#define CLOSE_RANGE_UNSHARE (1U << 1)
#endif
+#include <sys/mount.h>
+
+/* Older C libraries, or kernel headers < 5.2 and < 5.12, need these */
+#ifndef SYS_open_tree
+#define SYS_open_tree 428
+#endif
+#ifndef OPEN_TREE_CLONE
+#define OPEN_TREE_CLONE 1
+#define OPEN_TREE_CLOEXEC O_CLOEXEC
+#endif
+#ifndef AT_RECURSIVE
+#define AT_RECURSIVE 0x8000
+#endif
+#ifndef SYS_mount_setattr
+#define SYS_mount_setattr 442
+#endif
+#ifndef MOUNT_ATTR_RDONLY
+#define MOUNT_ATTR_RDONLY 0x00000001
+#define MOUNT_ATTR_NOSUID 0x00000002
+#define MOUNT_ATTR_NODEV 0x00000004
+#define MOUNT_ATTR_NOEXEC 0x00000008
+
+struct mount_attr {
+ uint64_t attr_set;
+ uint64_t attr_clr;
+ uint64_t propagation;
+ uint64_t userns_fd;
+};
+#endif
+
#ifndef TCP_REPAIR_ON
#define TCP_REPAIR_ON 1
#define TCP_REPAIR_OFF 0