X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fbasic%2Fmissing.h;h=981b7932524c6a02fc23e9b5465f22eb7d8e4d30;hp=7ba1c68e81292f6ed54d365a0ab6965077cd7ff0;hb=076d998b73bf53e6652ea3ae4bed169e57423741;hpb=3cd22db822df747636dcf30ebb8ec5d16bb71880 diff --git a/src/basic/missing.h b/src/basic/missing.h index 7ba1c68e8..981b79325 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -1,5 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - #pragma once /*** @@ -23,19 +21,20 @@ /* Missing glibc definitions to access certain kernel APIs */ -#include -#include -#include -#include -#include #include -#include -#include -#include -#include +#include #include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include "musl_missing.h" @@ -128,6 +127,14 @@ #define SOL_NETLINK 270 #endif +#ifndef NETLINK_LIST_MEMBERSHIPS +#define NETLINK_LIST_MEMBERSHIPS 9 +#endif + +#ifndef SOL_SCTP +#define SOL_SCTP 132 +#endif + #if !HAVE_DECL_PIVOT_ROOT static inline int pivot_root(const char *new_root, const char *put_old) { return syscall(SYS_pivot_root, new_root, put_old); @@ -250,6 +257,11 @@ static inline int getrandom(void *buffer, size_t count, unsigned flags) { #define BTRFS_SEARCH_ARGS_BUFSIZE (4096 - sizeof(struct btrfs_ioctl_search_key)) #endif +#ifndef BTRFS_QGROUP_LEVEL_SHIFT +#define BTRFS_QGROUP_LEVEL_SHIFT 48 +#endif + +#if 0 /// UNNEEDED by elogind (It can not support BTRFS at all) #ifndef HAVE_LINUX_BTRFS_H struct btrfs_ioctl_vol_args { int64_t fd; @@ -488,6 +500,10 @@ struct btrfs_ioctl_quota_ctl_args { #define BTRFS_QGROUP_LIMIT_KEY 244 #endif +#ifndef BTRFS_QGROUP_RELATION_KEY +#define BTRFS_QGROUP_RELATION_KEY 246 +#endif + #ifndef BTRFS_ROOT_BACKREF_KEY #define BTRFS_ROOT_BACKREF_KEY 144 #endif @@ -496,6 +512,8 @@ struct btrfs_ioctl_quota_ctl_args { #define BTRFS_SUPER_MAGIC 0x9123683E #endif +#endif // 0 + #ifndef CGROUP_SUPER_MAGIC #define CGROUP_SUPER_MAGIC 0x27e0eb #endif @@ -890,6 +908,10 @@ static inline int setns(int fd, int nstype) { #define NDA_MAX (__NDA_MAX - 1) #endif +#ifndef RTA_PREF +#define RTA_PREF 20 +#endif + #ifndef IPV6_UNICAST_IF #define IPV6_UNICAST_IF 76 #endif @@ -955,6 +977,10 @@ static inline int setns(int fd, int nstype) { #define IFA_FLAGS 8 #endif +#ifndef IFA_F_MANAGETEMPADDR +#define IFA_F_MANAGETEMPADDR 0x100 +#endif + #ifndef IFA_F_NOPREFIXROUTE #define IFA_F_NOPREFIXROUTE 0x200 #endif @@ -1009,8 +1035,11 @@ static inline pid_t raw_getpid(void) { #endif } +#if 0 /// UNNEEDED by elogind + #if !HAVE_DECL_RENAMEAT2 + #ifndef __NR_renameat2 # if defined __x86_64__ # define __NR_renameat2 316 @@ -1110,3 +1139,4 @@ static inline key_serial_t request_key(const char *type, const char *description #ifndef KEY_SPEC_USER_KEYRING #define KEY_SPEC_USER_KEYRING -4 #endif +#endif // 0