summaryrefslogtreecommitdiffstats
path: root/src/basic/missing_socket.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/missing_socket.h')
-rw-r--r--src/basic/missing_socket.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/basic/missing_socket.h b/src/basic/missing_socket.h
index 30ac297..47cc762 100644
--- a/src/basic/missing_socket.h
+++ b/src/basic/missing_socket.h
@@ -6,7 +6,6 @@
#if 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;
@@ -20,6 +19,26 @@ struct sockaddr_vm {
};
#endif /* !HAVE_LINUX_VM_SOCKETS_H */
+#ifndef VMADDR_CID_ANY
+#define VMADDR_CID_ANY -1U
+#endif
+
+#ifndef VMADDR_CID_HYPERVISOR
+#define VMADDR_CID_HYPERVISOR 0U
+#endif
+
+#ifndef VMADDR_CID_LOCAL
+#define VMADDR_CID_LOCAL 1U
+#endif
+
+#ifndef VMADDR_CID_HOST
+#define VMADDR_CID_HOST 2U
+#endif
+
+#ifndef VMADDR_PORT_ANY
+#define VMADDR_PORT_ANY -1U
+#endif
+
#ifndef AF_VSOCK
#define AF_VSOCK 40
#endif
@@ -32,6 +51,10 @@ struct sockaddr_vm {
#define SO_PEERGROUPS 59
#endif
+#ifndef SO_PEERPIDFD
+#define SO_PEERPIDFD 77
+#endif
+
#ifndef SO_BINDTOIFINDEX
#define SO_BINDTOIFINDEX 62
#endif