diff options
author | tim <tim> | 2002-05-28 00:37:32 +0000 |
---|---|---|
committer | tim <tim> | 2002-05-28 00:37:32 +0000 |
commit | ac4b777a5f2e0bfa2161fc5734d0fde76edf6467 (patch) | |
tree | 5fdd78b22177805e4538baf39fa4753cf935bc2a /monitor_fdpass.c | |
parent | 5273806211aea212c4c9b26035b3b7f4d5f58e8d (diff) | |
download | openssh-ac4b777a5f2e0bfa2161fc5734d0fde76edf6467.tar.gz |
[configure.ac.orig monitor_fdpass.c] Enahnce msghdr tests to address
build problem on Irix reported by Dave Love <d.love@dl.ac.uk>. Back out
last monitor_fdpass.c changes that are no longer needed with new tests.
Patch tested on Irix by Jan-Frode Myklebust <janfrode@parallab.uib.no>
Diffstat (limited to 'monitor_fdpass.c')
-rw-r--r-- | monitor_fdpass.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/monitor_fdpass.c b/monitor_fdpass.c index fb97171f..5401ea46 100644 --- a/monitor_fdpass.c +++ b/monitor_fdpass.c @@ -39,14 +39,13 @@ mm_send_fd(int socket, int fd) struct iovec vec; char ch = '\0'; int n; -#if !defined(HAVE_ACCRIGHTS_IN_MSGHDR) || \ - (defined(HAVE_ACCRIGHTS_IN_MSGHDR) && defined(HAVE_CONTROL_IN_MSGHDR)) +#ifndef HAVE_ACCRIGHTS_IN_MSGHDR char tmp[CMSG_SPACE(sizeof(int))]; struct cmsghdr *cmsg; #endif memset(&msg, 0, sizeof(msg)); -#if defined(HAVE_ACCRIGHTS_IN_MSGHDR) && !defined(HAVE_CONTROL_IN_MSGHDR) +#ifdef HAVE_ACCRIGHTS_IN_MSGHDR msg.msg_accrights = (caddr_t)&fd; msg.msg_accrightslen = sizeof(fd); #else @@ -84,8 +83,7 @@ mm_receive_fd(int socket) struct iovec vec; char ch; int fd, n; -#if !defined(HAVE_ACCRIGHTS_IN_MSGHDR) || \ - (defined(HAVE_ACCRIGHTS_IN_MSGHDR) && defined(HAVE_CONTROL_IN_MSGHDR)) +#ifndef HAVE_ACCRIGHTS_IN_MSGHDR char tmp[CMSG_SPACE(sizeof(int))]; struct cmsghdr *cmsg; #endif @@ -95,7 +93,7 @@ mm_receive_fd(int socket) vec.iov_len = 1; msg.msg_iov = &vec; msg.msg_iovlen = 1; -#if defined(HAVE_ACCRIGHTS_IN_MSGHDR) && !defined(HAVE_CONTROL_IN_MSGHDR) +#ifdef HAVE_ACCRIGHTS_IN_MSGHDR msg.msg_accrights = (caddr_t)&fd; msg.msg_accrightslen = sizeof(fd); #else @@ -109,7 +107,7 @@ mm_receive_fd(int socket) fatal("%s: recvmsg: expected received 1 got %d", __FUNCTION__, n); -#if defined(HAVE_ACCRIGHTS_IN_MSGHDR) && !defined(HAVE_CONTROL_IN_MSGHDR) +#ifdef HAVE_ACCRIGHTS_IN_MSGHDR if (msg.msg_accrightslen != sizeof(fd)) fatal("%s: no fd", __FUNCTION__); #else |