chiark / gitweb /
Prep v233.2: Mask unneeded functions and definitions in src/basic
[elogind.git] / src / basic / missing.h
index 50c9e7cd8870f0d6f6b0aa94b2f859fdffef7df6..b1a512eb4a33f489f2c1a2d08ac5610b65365e29 100644 (file)
@@ -34,6 +34,7 @@
 #include <net/ethernet.h>
 #include <stdlib.h>
 #include <sys/resource.h>
+#include <sys/socket.h>
 #include <sys/syscall.h>
 #include <uchar.h>
 #include <unistd.h>
 #include <linux/btrfs.h>
 #endif
 
+#if 0 /// UNNEEDED by elogind
+#ifdef HAVE_LINUX_VM_SOCKETS_H
+#include <linux/vm_sockets.h>
+#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
+
 #include "macro.h"
 
 #ifndef RLIMIT_RTTIME
@@ -1033,7 +1053,6 @@ 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
@@ -1091,7 +1110,6 @@ typedef int32_t key_serial_t;
 #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
@@ -1139,6 +1157,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 */
@@ -1165,6 +1184,7 @@ struct ethtool_link_settings {
 };
 
 #endif
+#endif // 0
 
 #endif
 
@@ -1172,4 +1192,8 @@ struct ethtool_link_settings {
 #define SOL_ALG 279
 #endif
 
+#ifndef AF_VSOCK
+#define AF_VSOCK 40
+#endif
+
 #include "missing_syscall.h"