declarations, removing an unnecessary union member and adding whitespace.
ok djm some time ago.
+20081123
+ - (dtucker) [monitor_fdpass.c] Reduce diff vs OpenBSD by moving some
+ declarations, removing an unnecessary union member and adding whitespace.
+ ok djm some time ago.
+
20081118
- (tim) [addrmatch.c configure.ac] Some platforms do not have sin6_scope_id
member of sockaddr_in6. Also reported in Bug 1491 by David Leonard. OK and
20081118
- (tim) [addrmatch.c configure.ac] Some platforms do not have sin6_scope_id
member of sockaddr_in6. Also reported in Bug 1491 by David Leonard. OK and
{
#if defined(HAVE_SENDMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR))
struct msghdr msg;
{
#if defined(HAVE_SENDMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR))
struct msghdr msg;
- struct iovec vec;
- char ch = '\0';
- ssize_t n;
#ifndef HAVE_ACCRIGHTS_IN_MSGHDR
union {
struct cmsghdr hdr;
#ifndef HAVE_ACCRIGHTS_IN_MSGHDR
union {
struct cmsghdr hdr;
- char tmp[CMSG_SPACE(sizeof(int))];
char buf[CMSG_SPACE(sizeof(int))];
} cmsgbuf;
struct cmsghdr *cmsg;
#endif
char buf[CMSG_SPACE(sizeof(int))];
} cmsgbuf;
struct cmsghdr *cmsg;
#endif
+ struct iovec vec;
+ char ch = '\0';
+ ssize_t n;
memset(&msg, 0, sizeof(msg));
#ifdef HAVE_ACCRIGHTS_IN_MSGHDR
memset(&msg, 0, sizeof(msg));
#ifdef HAVE_ACCRIGHTS_IN_MSGHDR
{
#if defined(HAVE_RECVMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR))
struct msghdr msg;
{
#if defined(HAVE_RECVMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR))
struct msghdr msg;
- struct iovec vec;
- ssize_t n;
- char ch;
- int fd;
#ifndef HAVE_ACCRIGHTS_IN_MSGHDR
union {
struct cmsghdr hdr;
#ifndef HAVE_ACCRIGHTS_IN_MSGHDR
union {
struct cmsghdr hdr;
} cmsgbuf;
struct cmsghdr *cmsg;
#endif
} cmsgbuf;
struct cmsghdr *cmsg;
#endif
+ struct iovec vec;
+ ssize_t n;
+ char ch;
+ int fd;
memset(&msg, 0, sizeof(msg));
vec.iov_base = &ch;
memset(&msg, 0, sizeof(msg));
vec.iov_base = &ch;
error("%s: recvmsg: %s", __func__, strerror(errno));
return -1;
}
error("%s: recvmsg: %s", __func__, strerror(errno));
return -1;
}
if (n != 1) {
error("%s: recvmsg: expected received 1 got %ld",
__func__, (long)n);
if (n != 1) {
error("%s: recvmsg: expected received 1 got %ld",
__func__, (long)n);
error("%s: no message header", __func__);
return -1;
}
error("%s: no message header", __func__);
return -1;
}
#ifndef BROKEN_CMSG_TYPE
if (cmsg->cmsg_type != SCM_RIGHTS) {
error("%s: expected type %d got %d", __func__,
#ifndef BROKEN_CMSG_TYPE
if (cmsg->cmsg_type != SCM_RIGHTS) {
error("%s: expected type %d got %d", __func__,