From a0252bc75b8546008c6b87e58344c4340683d5eb Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 31 Oct 2019 23:09:48 -0400 Subject: move msghdr and cmsghdr out of bits/socket.h these structures can now be defined generically in terms of endianness and long size. previously, the 32-bit archs all shared a common definition from the generic bits header, and each 64-bit arch had to repeat the 64-bit version, with endian conditionals if the arch had variants of each endianness. I would prefer getting rid of the preprocessor conditionals for padding and instead using unnamed bitfield members, like commit 9b2921bea1d5017832e1b45d1fd64220047a9802 did for struct timespec. however, at present sendmsg, recvmsg, and recvmmsg need access to the padding members by name to zero them. this could perhaps be cleaned up in the future. --- arch/x86_64/bits/socket.h | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 arch/x86_64/bits/socket.h (limited to 'arch/x86_64/bits') diff --git a/arch/x86_64/bits/socket.h b/arch/x86_64/bits/socket.h deleted file mode 100644 index a4c89f3d..00000000 --- a/arch/x86_64/bits/socket.h +++ /dev/null @@ -1,16 +0,0 @@ -struct msghdr { - void *msg_name; - socklen_t msg_namelen; - struct iovec *msg_iov; - int msg_iovlen, __pad1; - void *msg_control; - socklen_t msg_controllen, __pad2; - int msg_flags; -}; - -struct cmsghdr { - socklen_t cmsg_len; - int __pad1; - int cmsg_level; - int cmsg_type; -}; -- cgit v1.2.1