fd_util: work around aliasing warning in recvmsg_cloexec()

This commit is contained in:
Max Kellermann 2010-09-23 08:56:54 +02:00
parent 5b996ab880
commit 4425989898

View File

@ -270,8 +270,8 @@ recvmsg_cloexec(int sockfd, struct msghdr *msg, int flags)
struct cmsghdr *cmsg = CMSG_FIRSTHDR(msg);
while (cmsg != NULL) {
if (cmsg->cmsg_type == SCM_RIGHTS) {
int fd = *(const int *)CMSG_DATA(cmsg);
fd_set_cloexec(fd, true);
const int *fd_p = (const int *)CMSG_DATA(cmsg);
fd_set_cloexec(*fd_p, true);
}
cmsg = CMSG_NXTHDR(msg, cmsg);