summaryrefslogtreecommitdiff
path: root/src/aio
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2014-11-20 21:58:01 +0100
committerMartin Sustrik <sustrik@250bpm.com>2014-11-20 21:58:01 +0100
commit3cae36468c91f5de65234caae07c888b869510b1 (patch)
treed2871064a110c19bd9d50847abe4537c5556bff8 /src/aio
parent48d717c110650cf40bae5d10cf8669758263c10e (diff)
downloadnanomsg-3cae36468c91f5de65234caae07c888b869510b1.tar.gz
Check for presence of msghdr.msg_control
The field doesn't exist on some old systems. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/aio')
-rw-r--r--src/aio/usock_posix.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/aio/usock_posix.inc b/src/aio/usock_posix.inc
index 6af6fbf..c87f708 100644
--- a/src/aio/usock_posix.inc
+++ b/src/aio/usock_posix.inc
@@ -1117,6 +1117,7 @@ static int nn_usock_recv_raw (struct nn_usock *self, void *buf, size_t *len)
}
/* Extract the associated file descriptor, if any. */
+#if defined NN_HAVE_MSG_CONTROL
cmsg = CMSG_FIRSTHDR (&hdr);
while (cmsg) {
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
@@ -1131,6 +1132,8 @@ static int nn_usock_recv_raw (struct nn_usock *self, void *buf, size_t *len)
}
cmsg = CMSG_NXTHDR (&hdr, cmsg);
}
+#else
+#endif
/* If the data were received directly into the place we can return
straight away. */