提交 573a4d2d 编写于 作者: R Rich Felker

fix x32 msghdr struct by removing x32 bits/socket.h

being that it contains pointers and (from the kernel perspective,
which is wrong) size_t members, x32 uses the 32-bit version of the
structure, not a half-32-bit, half-64-bit layout like we had here. the
x86_64 definition was inadvertently copied when x32 was first added.

unlike errors in the opposite direction (missing padding), this error
was not easily detected breakage, because the layout of the commonly
used initial subset of members still matched. breakage could only be
observed in the presence of control messages or flags.
上级 0bbc04c9
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;
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册