summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2014-05-31 12:16:08 +0200
committerMichael Adam <obnox@samba.org>2014-06-03 01:14:17 +0200
commit6a0ebc45968e65fa65cb23582d109531733e8a0e (patch)
treeca66ac176cdea890279197977a8391362a4fc675 /source3
parent65a6c31d9d6467bf23875daa5bab8135f7b1d347 (diff)
downloadsamba-6a0ebc45968e65fa65cb23582d109531733e8a0e.tar.gz
samba-6a0ebc45968e65fa65cb23582d109531733e8a0e.tar.xz
samba-6a0ebc45968e65fa65cb23582d109531733e8a0e.zip
s3:messaging: protect use of msg_control with HAVE_STRUCT_MSGHDR_MSG_CONTROL
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Jun 3 01:14:17 CEST 2014 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/unix_msg/unix_msg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c
index bcabd28da28..602ecc63f6f 100644
--- a/source3/lib/unix_msg/unix_msg.c
+++ b/source3/lib/unix_msg/unix_msg.c
@@ -244,8 +244,10 @@ static void unix_dgram_recv_handler(struct poll_watch *w, int fd, short events,
msg = (struct msghdr) {
.msg_iov = &iov,
.msg_iovlen = 1,
+#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
.msg_control = NULL,
.msg_controllen = 0,
+#endif
};
received = recvmsg(fd, &msg, 0);
@@ -509,8 +511,10 @@ static int unix_dgram_send(struct unix_dgram_ctx *ctx, const char *dst_sock,
msg.msg_namelen = sizeof(addr);
msg.msg_iov = discard_const_p(struct iovec, iov);
msg.msg_iovlen = iovlen;
+#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
msg.msg_control = NULL;
msg.msg_controllen = 0;
+#endif
msg.msg_flags = 0;
ret = sendmsg(ctx->sock, &msg, 0);