]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
missing_socket: drop unnecessary definitions 34307/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 7 Sep 2024 15:15:38 +0000 (00:15 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 9 Sep 2024 05:52:18 +0000 (14:52 +0900)
Now, we have copy of vm_sockets.h, hence these definitions are not
necessary anymore.

meson.build
src/basic/missing_socket.h
src/basic/socket-util.h

index fbc2bbdf2f22fcac47ec7c999c6f2dfaee2d3a00..c26302d25cacbe6016986ab6150252b0ffca83d6 100644 (file)
@@ -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',
index 5d9c5b483d9192d6fff746ad99906e28806ff617..55de40a321618a9ed764d45f9dada2c167184178 100644 (file)
@@ -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
index 64eb6d7cdaabdd5bdd85f6f53e6d2623e999bb23..ba86b907a7e3f6e22c6501cc439cdd57330262cd 100644 (file)
@@ -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>