summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-09-07 17:15:38 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-09-09 07:52:18 +0200
commit85fd8df03df56027645a52c91e9dac6712d86195 (patch)
treec14b77bbeb63d2ee52e89f01df87d1d8c04a325a
parentmissing_network: drop unnecessary definition (diff)
downloadsystemd-85fd8df03df56027645a52c91e9dac6712d86195.tar.xz
systemd-85fd8df03df56027645a52c91e9dac6712d86195.zip
missing_socket: drop unnecessary definitions
Now, we have copy of vm_sockets.h, hence these definitions are not necessary anymore.
-rw-r--r--meson.build1
-rw-r--r--src/basic/missing_socket.h41
-rw-r--r--src/basic/socket-util.h5
3 files changed, 3 insertions, 44 deletions
diff --git a/meson.build b/meson.build
index fbc2bbdf2f..c26302d25c 100644
--- a/meson.build
+++ b/meson.build
@@ -764,7 +764,6 @@ foreach header : ['crypt.h',
'linux/ioprio.h',
'linux/memfd.h',
'linux/time_types.h',
- 'linux/vm_sockets.h',
'sys/auxv.h',
'sys/sdt.h',
'threads.h',
diff --git a/src/basic/missing_socket.h b/src/basic/missing_socket.h
index 5d9c5b483d..55de40a321 100644
--- a/src/basic/missing_socket.h
+++ b/src/basic/missing_socket.h
@@ -3,42 +3,6 @@
#include <sys/socket.h>
-#if HAVE_LINUX_VM_SOCKETS_H
-#include <linux/vm_sockets.h>
-#else
-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 */
-
-#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
@@ -104,8 +68,3 @@ struct sockaddr_vm {
#ifndef IPV6_RECVFRAGSIZE
#define IPV6_RECVFRAGSIZE 77
#endif
-
-/* linux/sockios.h */
-#ifndef SIOCGSKNS
-#define SIOCGSKNS 0x894C
-#endif
diff --git a/src/basic/socket-util.h b/src/basic/socket-util.h
index 64eb6d7cda..ba86b907a7 100644
--- a/src/basic/socket-util.h
+++ b/src/basic/socket-util.h
@@ -2,15 +2,16 @@
#pragma once
#include <inttypes.h>
-#include <linux/netlink.h>
#include <linux/if_ether.h>
#include <linux/if_infiniband.h>
#include <linux/if_packet.h>
+#include <linux/netlink.h>
+#include <sys/socket.h> /* linux/vms_sockets.h requires 'struct sockaddr' */
+#include <linux/vm_sockets.h>
#include <netinet/in.h>
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
-#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>