1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

missing_socket: drop unnecessary definitions

Now, we have copy of vm_sockets.h, hence these definitions are not
necessary anymore.
This commit is contained in:
Yu Watanabe 2024-09-08 00:15:38 +09:00
parent 47a71f9852
commit 85fd8df03d
3 changed files with 3 additions and 44 deletions

View File

@ -764,7 +764,6 @@ foreach header : ['crypt.h',
'linux/ioprio.h', 'linux/ioprio.h',
'linux/memfd.h', 'linux/memfd.h',
'linux/time_types.h', 'linux/time_types.h',
'linux/vm_sockets.h',
'sys/auxv.h', 'sys/auxv.h',
'sys/sdt.h', 'sys/sdt.h',
'threads.h', 'threads.h',

View File

@ -3,42 +3,6 @@
#include <sys/socket.h> #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 #ifndef AF_VSOCK
#define AF_VSOCK 40 #define AF_VSOCK 40
#endif #endif
@ -104,8 +68,3 @@ struct sockaddr_vm {
#ifndef IPV6_RECVFRAGSIZE #ifndef IPV6_RECVFRAGSIZE
#define IPV6_RECVFRAGSIZE 77 #define IPV6_RECVFRAGSIZE 77
#endif #endif
/* linux/sockios.h */
#ifndef SIOCGSKNS
#define SIOCGSKNS 0x894C
#endif

View File

@ -2,15 +2,16 @@
#pragma once #pragma once
#include <inttypes.h> #include <inttypes.h>
#include <linux/netlink.h>
#include <linux/if_ether.h> #include <linux/if_ether.h>
#include <linux/if_infiniband.h> #include <linux/if_infiniband.h>
#include <linux/if_packet.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 <netinet/in.h>
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <sys/socket.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/un.h> #include <sys/un.h>