MIPS bits/socket.h update
Joseph S. Myers
joseph@codesourcery.com
Tue Sep 13 16:05:00 GMT 2011
I've applied this patch to update the MIPS bits/socket.h for two recent
libc changes. Alpha and PA also have their own versions of this header.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index b99b338..8da2af2 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,10 @@
2011-09-13 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/unix/sysv/linux/mips/bits/socket.h (__cmsg_nxthdr): Cast
+ return value to (struct cmsghdr *).
+
+2011-09-13 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/mips/elf/configure.in: Always test for TLS support and
error out in case it is missing.
* sysdeps/mips/elf/configure: Regenerate.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 2399490..4aacfae 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -312,7 +312,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
{
if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
/* The kernel header does this so there may be a reason. */
- return 0;
+ return (struct cmsghdr *) 0;
__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ CMSG_ALIGN (__cmsg->cmsg_len));
@@ -321,7 +321,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
> ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
/* No more entries. */
- return 0;
+ return (struct cmsghdr *) 0;
return __cmsg;
}
#endif /* Use `extern inline'. */
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-ports
mailing list