summaryrefslogtreecommitdiff
path: root/monitor_fdpass.c
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2002-05-27 17:37:32 -0700
committerTim Rice <tim@multitalents.net>2002-05-27 17:37:32 -0700
commit28bbb0c458c1f6cee5c3de1cec1f9dfea14d7196 (patch)
treed3363c5647504f6dfeb541f9d71ceac504247aef /monitor_fdpass.c
parent116e6dfaad3543c381ef48e0c42a3a86cebe644c (diff)
[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.c12
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