summaryrefslogtreecommitdiff
path: root/arch/x86_64/bits/socket.h
AgeCommit message (Collapse)AuthorLines
2019-11-02move msghdr and cmsghdr out of bits/socket.hRich Felker-16/+0
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.
2016-07-03make brace placement in public header struct definitions consistentRich Felker-4/+2
placing the opening brace on the same line as the struct keyword/tag is the style I prefer and seems to be the prevailing practice in more recent additions. these changes were generated by the command: find include/ arch/*/bits -name '*.h' \ -exec sed -i '/^struct [^;{]*$/{N;s/\n/ /;}' {} + and subsequently checked by hand to ensure that the regex did not pick up any false positives.
2012-07-12workaround another sendmsg kernel bug on 64-bit machinesRich Felker-0/+8
the kernel wrongly expects the cmsg length field to be size_t instead of socklen_t. in order to work around the issue, we have to impose a length limit and copy to a local buffer. the length limit should be more than sufficient for any real-world use; these headers are only used for passing file descriptors and permissions between processes over unix sockets.
2011-09-18cleanup more bits cruft (sysmacros and socket)Rich Felker-200/+0
2011-07-21socket headers macro adjustment - workaround for buggy programsRich Felker-1/+1
some program was undefining AF_NETLINK and thereby breaking AF_ROUTE...
2011-04-08workaround broken msghdr struct on 64bit linuxRich Felker-2/+2
POSIX clearly specifies the type of msg_iovlen and msg_controllen, and Linux ignores it and makes them both size_t instead. to work around this we add padding (instead of just using the wrong types like glibc does), but we also need to patch-up the struct before passing it to the kernel in case the caller did not zero-fill it. if i could trust the kernel to just ignore the upper 32 bits, this would not be necessary, but i don't think it will ignore them...
2011-02-15Update x86_64 bits to mirror (modulo platform differences) the latest changesNicholas J. Kain-2/+0
to i386.
2011-02-15Port musl to x86-64. One giant commit!Nicholas J. Kain-0/+212