X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbasic%2Fmissing.h;h=1a4c62b477f4899c42047b53c1cced8047b198fe;hb=1c8e31366269c1af3fa3994755bb4d49b21818ee;hp=71a4489781cf3397c315e0c3ca60ee3f1c567784;hpb=084937b3d7c4da3e3c48d05779f8cfbdc39a2ce6;p=elogind.git diff --git a/src/basic/missing.h b/src/basic/missing.h index 71a448978..1a4c62b47 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -53,7 +54,24 @@ #include #endif -#include "macro.h" +#if 0 /// UNNEEDED by elogind +#ifdef HAVE_LINUX_VM_SOCKETS_H +#include +#else +#define VMADDR_CID_ANY -1U +struct sockaddr_vm { + unsigned short svm_family; + unsigned short svm_reserved1; + unsigned int svm_port; + unsigned int svm_cid; + unsigned char svm_zero[sizeof(struct sockaddr) - + sizeof(unsigned short) - + sizeof(unsigned short) - + sizeof(unsigned int) - + sizeof(unsigned int)]; +}; +#endif /* !HAVE_LINUX_VM_SOCKETS_H */ +#endif // 0 #ifndef RLIMIT_RTTIME #define RLIMIT_RTTIME 15 @@ -713,7 +731,7 @@ struct btrfs_ioctl_quota_ctl_args { #define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1) #endif -#if !HAVE_DECL_IFLA_VXLAN_REMCSUM_NOPARTIAL +#if !HAVE_DECL_IFLA_VXLAN_GPE #define IFLA_VXLAN_UNSPEC 0 #define IFLA_VXLAN_ID 1 #define IFLA_VXLAN_GROUP 2 @@ -739,7 +757,11 @@ struct btrfs_ioctl_quota_ctl_args { #define IFLA_VXLAN_REMCSUM_RX 22 #define IFLA_VXLAN_GBP 23 #define IFLA_VXLAN_REMCSUM_NOPARTIAL 24 -#define __IFLA_VXLAN_MAX 25 +#define IFLA_VXLAN_COLLECT_METADATA 25 +#define IFLA_VXLAN_LABEL 26 +#define IFLA_VXLAN_GPE 27 + +#define __IFLA_VXLAN_MAX 28 #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) #endif @@ -1033,7 +1055,22 @@ struct btrfs_ioctl_quota_ctl_args { typedef int32_t key_serial_t; #endif -#if 0 /// UNNEEDED by elogind +#ifndef KEYCTL_JOIN_SESSION_KEYRING +#define KEYCTL_JOIN_SESSION_KEYRING 1 +#endif + +#ifndef KEYCTL_CHOWN +#define KEYCTL_CHOWN 4 +#endif + +#ifndef KEYCTL_SETPERM +#define KEYCTL_SETPERM 5 +#endif + +#ifndef KEYCTL_DESCRIBE +#define KEYCTL_DESCRIBE 6 +#endif + #ifndef KEYCTL_READ #define KEYCTL_READ 11 #endif @@ -1042,10 +1079,43 @@ typedef int32_t key_serial_t; #define KEYCTL_SET_TIMEOUT 15 #endif +#ifndef KEY_POS_VIEW +#define KEY_POS_VIEW 0x01000000 +#define KEY_POS_READ 0x02000000 +#define KEY_POS_WRITE 0x04000000 +#define KEY_POS_SEARCH 0x08000000 +#define KEY_POS_LINK 0x10000000 +#define KEY_POS_SETATTR 0x20000000 + +#define KEY_USR_VIEW 0x00010000 +#define KEY_USR_READ 0x00020000 +#define KEY_USR_WRITE 0x00040000 +#define KEY_USR_SEARCH 0x00080000 +#define KEY_USR_LINK 0x00100000 +#define KEY_USR_SETATTR 0x00200000 + +#define KEY_GRP_VIEW 0x00000100 +#define KEY_GRP_READ 0x00000200 +#define KEY_GRP_WRITE 0x00000400 +#define KEY_GRP_SEARCH 0x00000800 +#define KEY_GRP_LINK 0x00001000 +#define KEY_GRP_SETATTR 0x00002000 + +#define KEY_OTH_VIEW 0x00000001 +#define KEY_OTH_READ 0x00000002 +#define KEY_OTH_WRITE 0x00000004 +#define KEY_OTH_SEARCH 0x00000008 +#define KEY_OTH_LINK 0x00000010 +#define KEY_OTH_SETATTR 0x00000020 +#endif + #ifndef KEY_SPEC_USER_KEYRING #define KEY_SPEC_USER_KEYRING -4 #endif -#endif // 0 + +#ifndef KEY_SPEC_SESSION_KEYRING +#define KEY_SPEC_SESSION_KEYRING -3 +#endif #ifndef PR_CAP_AMBIENT #define PR_CAP_AMBIENT 47 @@ -1089,6 +1159,7 @@ typedef int32_t key_serial_t; #define IFA_F_MCAUTOJOIN 0x400 #endif +#if 0 /// UNNEEDED by elogind #ifndef HAVE_STRUCT_ETHTOOL_LINK_SETTINGS #define ETHTOOL_GLINKSETTINGS 0x0000004c /* Get ethtool_link_settings */ @@ -1115,6 +1186,7 @@ struct ethtool_link_settings { }; #endif +#endif // 0 #endif @@ -1122,4 +1194,8 @@ struct ethtool_link_settings { #define SOL_ALG 279 #endif +#ifndef AF_VSOCK +#define AF_VSOCK 40 +#endif + #include "missing_syscall.h"