diff options
author | Tim Rice <tim@multitalents.net> | 2002-05-28 02:37:32 +0200 |
---|---|---|
committer | Tim Rice <tim@multitalents.net> | 2002-05-28 02:37:32 +0200 |
commit | 28bbb0c458c1f6cee5c3de1cec1f9dfea14d7196 (patch) | |
tree | d3363c5647504f6dfeb541f9d71ceac504247aef /monitor_fdpass.c | |
parent | unbreak (aaarrrgggh - stupid vi) (diff) | |
download | openssh-28bbb0c458c1f6cee5c3de1cec1f9dfea14d7196.tar.xz openssh-28bbb0c458c1f6cee5c3de1cec1f9dfea14d7196.zip |
[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 fb97171ff..5401ea466 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 |