On Solaris, HAVE_STRUCT_MSGHDR_MSG_CONTROL is not defined, so source3/lib/unix_msg/unix_msg.c and source3/modules/vfs_aio_fork.c cannot be compiled. Here are possible fixes, I am sure if they are correct or not: diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c index 4870068..dafc799 100644 --- a/source3/lib/unix_msg/unix_msg.c +++ b/source3/lib/unix_msg/unix_msg.c @@ -505,7 +505,9 @@ static int queue_msg(struct unix_dgram_send_queue *q, * Note: No need to check for overflow here, * since cmsg will store <= INT8_MAX fds. */ +#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL msglen += cmsg_space; +#endif data_len = iov_buflen(iov, iovlen); if (data_len == -1) { @@ -593,7 +595,9 @@ static int queue_msg(struct unix_dgram_send_queue *q, return 0; fail: +#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL close_fd_array(fds_copy, num_fds); +#endif return ret; } diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c index c1bded9..652a1e3 100644 --- a/source3/modules/vfs_aio_fork.c +++ b/source3/modules/vfs_aio_fork.c @@ -173,7 +173,9 @@ static ssize_t read_fd(int fd, void *ptr, size_t nbytes, int *recvfd) msg.msg_name = NULL; msg.msg_namelen = 0; +#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL msg.msg_flags = 0; +#endif iov[0].iov_base = (void *)ptr; iov[0].iov_len = nbytes;
Created attachment 10323 [details] Test patch I think this might be cleaner (less additional #ifdefs :-). Can you confirm it works and get back to me, then I'll propose it for master ? Thanks, Jeremy.
Yes, it works. Thank you.
This is the patch that went into master (no applicable to earlier versions).
We also need this for 4.2
Created attachment 10664 [details] Patch for v4-2-test
Comment on attachment 10664 [details] Patch for v4-2-test LGTM.
Re-assigning to Karolin for inclusion in 4.2.0.
Pushed to autobuild-v4-2-test.
Pushed to v4-2-test. Closing out bug report. Thanks!