]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/missing.h
missing: move one more network related definition to missing_network.h
[thirdparty/systemd.git] / src / basic / missing.h
index 4db565660d11c8ad7819d065472d44229d67d078..a057d06277617a6457f1fcc6852981f839c50d0c 100644 (file)
@@ -7,22 +7,14 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <linux/audit.h>
-#include <linux/capability.h>
 #include <linux/falloc.h>
 #include <linux/oom.h>
-#include <net/ethernet.h>
 #include <stdlib.h>
 #include <sys/resource.h>
 #include <sys/socket.h>
-#include <sys/stat.h>
 #include <sys/syscall.h>
-#include <uchar.h>
 #include <unistd.h>
 
-#if WANT_LINUX_STAT_H
-#include <linux/stat.h>
-#endif
-
 #if HAVE_AUDIT
 #include <libaudit.h>
 #endif
@@ -123,10 +115,6 @@ struct sockaddr_vm {
 #define SOL_NETLINK 270
 #endif
 
-#ifndef NETLINK_LIST_MEMBERSHIPS
-#define NETLINK_LIST_MEMBERSHIPS 9
-#endif
-
 #ifndef SOL_SCTP
 #define SOL_SCTP 132
 #endif
@@ -143,46 +131,10 @@ struct sockaddr_vm {
 #define FS_NOCOW_FL 0x00800000
 #endif
 
-#ifndef BTRFS_SUPER_MAGIC
-#define BTRFS_SUPER_MAGIC 0x9123683E
-#endif
-
-#ifndef CGROUP_SUPER_MAGIC
-#define CGROUP_SUPER_MAGIC 0x27e0eb
-#endif
-
-#ifndef CGROUP2_SUPER_MAGIC
-#define CGROUP2_SUPER_MAGIC 0x63677270
-#endif
-
 #ifndef CLONE_NEWCGROUP
 #define CLONE_NEWCGROUP 0x02000000
 #endif
 
-#ifndef TMPFS_MAGIC
-#define TMPFS_MAGIC 0x01021994
-#endif
-
-#ifndef MQUEUE_MAGIC
-#define MQUEUE_MAGIC 0x19800202
-#endif
-
-#ifndef SECURITYFS_MAGIC
-#define SECURITYFS_MAGIC 0x73636673
-#endif
-
-#ifndef TRACEFS_MAGIC
-#define TRACEFS_MAGIC 0x74726163
-#endif
-
-#ifndef BPF_FS_MAGIC
-#define BPF_FS_MAGIC 0xcafe4a11
-#endif
-
-#ifndef OCFS2_SUPER_MAGIC
-#define OCFS2_SUPER_MAGIC 0x7461636f
-#endif
-
 #ifndef MS_MOVE
 #define MS_MOVE 8192
 #endif
@@ -227,38 +179,6 @@ struct sockaddr_vm {
 #define SCM_SECURITY 0x03
 #endif
 
-#ifndef PR_SET_NO_NEW_PRIVS
-#define PR_SET_NO_NEW_PRIVS 38
-#endif
-
-#ifndef PR_SET_CHILD_SUBREAPER
-#define PR_SET_CHILD_SUBREAPER 36
-#endif
-
-#ifndef PR_SET_MM_ARG_START
-#define PR_SET_MM_ARG_START 8
-#endif
-
-#ifndef PR_SET_MM_ARG_END
-#define PR_SET_MM_ARG_END 9
-#endif
-
-#ifndef PR_SET_MM_ENV_START
-#define PR_SET_MM_ENV_START 10
-#endif
-
-#ifndef PR_SET_MM_ENV_END
-#define PR_SET_MM_ENV_END 11
-#endif
-
-#ifndef EFIVARFS_MAGIC
-#define EFIVARFS_MAGIC 0xde5e81e4
-#endif
-
-#ifndef SMACK_MAGIC
-#define SMACK_MAGIC 0x43415d53
-#endif
-
 #ifndef DM_DEFERRED_REMOVE
 #define DM_DEFERRED_REMOVE (1 << 17)
 #endif
@@ -327,15 +247,6 @@ struct sockaddr_vm {
 #define BPF_XOR 0xa0
 #endif
 
-/* Note that LOOPBACK_IFINDEX is currently not exported by the
- * kernel/glibc, but hardcoded internally by the kernel.  However, as
- * it is exported to userspace indirectly via rtnetlink and the
- * ioctls, and made use of widely we define it here too, in a way that
- * is compatible with the kernel's internal definition. */
-#ifndef LOOPBACK_IFINDEX
-#define LOOPBACK_IFINDEX 1
-#endif
-
 #ifndef MAX_AUDIT_MESSAGE_LENGTH
 #define MAX_AUDIT_MESSAGE_LENGTH 8970
 #endif
@@ -344,30 +255,6 @@ struct sockaddr_vm {
 #define AUDIT_NLGRP_READLOG 1
 #endif
 
-#ifndef CAP_MAC_OVERRIDE
-#define CAP_MAC_OVERRIDE 32
-#endif
-
-#ifndef CAP_MAC_ADMIN
-#define CAP_MAC_ADMIN 33
-#endif
-
-#ifndef CAP_SYSLOG
-#define CAP_SYSLOG 34
-#endif
-
-#ifndef CAP_WAKE_ALARM
-#define CAP_WAKE_ALARM 35
-#endif
-
-#ifndef CAP_BLOCK_SUSPEND
-#define CAP_BLOCK_SUSPEND 36
-#endif
-
-#ifndef CAP_AUDIT_READ
-#define CAP_AUDIT_READ 37
-#endif
-
 #ifndef RENAME_NOREPLACE
 #define RENAME_NOREPLACE (1 << 0)
 #endif
@@ -376,34 +263,6 @@ struct sockaddr_vm {
 #define KCMP_FILE 0
 #endif
 
-#ifndef PR_CAP_AMBIENT
-#define PR_CAP_AMBIENT 47
-#endif
-
-#ifndef PR_CAP_AMBIENT_IS_SET
-#define PR_CAP_AMBIENT_IS_SET 1
-#endif
-
-#ifndef PR_CAP_AMBIENT_RAISE
-#define PR_CAP_AMBIENT_RAISE 2
-#endif
-
-#ifndef PR_CAP_AMBIENT_CLEAR_ALL
-#define PR_CAP_AMBIENT_CLEAR_ALL 4
-#endif
-
-#if !HAVE_CHAR32_T
-#define char32_t uint32_t
-#endif
-
-#if !HAVE_CHAR16_T
-#define char16_t uint16_t
-#endif
-
-#ifndef ETHERTYPE_LLDP
-#define ETHERTYPE_LLDP 0x88cc
-#endif
-
 #ifndef SOL_ALG
 #define SOL_ALG 279
 #endif
@@ -416,10 +275,6 @@ struct sockaddr_vm {
 #  define EXT4_IOC_RESIZE_FS              _IOW('f', 16, __u64)
 #endif
 
-#ifndef NSFS_MAGIC
-#define NSFS_MAGIC 0x6e736673
-#endif
-
 #ifndef NS_GET_NSTYPE
 #define NS_GET_NSTYPE _IO(0xb7, 0x3)
 #endif
@@ -436,45 +291,6 @@ struct sockaddr_vm {
 #define PF_KTHREAD 0x00200000
 #endif
 
-#if ! HAVE_STRUCT_STATX
-struct statx_timestamp {
-        int64_t tv_sec;
-        uint32_t tv_nsec;
-        uint32_t __reserved;
-};
-struct statx {
-        uint32_t stx_mask;
-        uint32_t stx_blksize;
-        uint64_t stx_attributes;
-        uint32_t stx_nlink;
-        uint32_t stx_uid;
-        uint32_t stx_gid;
-        uint16_t stx_mode;
-        uint16_t __spare0[1];
-        uint64_t stx_ino;
-        uint64_t stx_size;
-        uint64_t stx_blocks;
-        uint64_t stx_attributes_mask;
-        struct statx_timestamp stx_atime;
-        struct statx_timestamp stx_btime;
-        struct statx_timestamp stx_ctime;
-        struct statx_timestamp stx_mtime;
-        uint32_t stx_rdev_major;
-        uint32_t stx_rdev_minor;
-        uint32_t stx_dev_major;
-        uint32_t stx_dev_minor;
-        uint64_t __spare2[14];
-};
-#endif
-
-#ifndef STATX_BTIME
-#define STATX_BTIME 0x00000800U
-#endif
-
-#ifndef AT_STATX_DONT_SYNC
-#define AT_STATX_DONT_SYNC 0x4000
-#endif
-
 /* The maximum thread/process name length including trailing NUL byte. This mimics the kernel definition of the same
  * name, which we need in userspace at various places but is not defined in userspace currently, neither under this
  * name nor any other. */
@@ -483,6 +299,11 @@ struct statx {
 #endif
 
 #include "missing_btrfs_tree.h"
+#include "missing_capability.h"
 #include "missing_input.h"
+#include "missing_magic.h"
 #include "missing_network.h"
+#include "missing_prctl.h"
+#include "missing_type.h"
+
 #include "missing_syscall.h"