mirror of
https://github.com/samba-team/samba.git
synced 2025-08-26 01:49:31 +03:00
build: rename HAVE_MSGHDR_MSG_CONTROL to HAVE_STRUCT_MSGHDR_MSG_CONTROL
So that we are consistent with the socket_wrapper define. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
@ -27,7 +27,7 @@
|
||||
#include "lib/async_req/async_sock.h"
|
||||
#include "lib/util/tevent_unix.h"
|
||||
|
||||
#if !defined(HAVE_MSGHDR_MSG_CONTROL) && !defined(HAVE_MSGHDR_MSG_ACCTRIGHTS)
|
||||
#if !defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && !defined(HAVE_MSGHDR_MSG_ACCTRIGHTS)
|
||||
# error Can not pass file descriptors
|
||||
#endif
|
||||
|
||||
@ -154,7 +154,7 @@ static ssize_t read_fd(int fd, void *ptr, size_t nbytes, int *recvfd)
|
||||
struct msghdr msg;
|
||||
struct iovec iov[1];
|
||||
ssize_t n;
|
||||
#ifndef HAVE_MSGHDR_MSG_CONTROL
|
||||
#ifndef HAVE_STRUCT_MSGHDR_MSG_CONTROL
|
||||
int newfd;
|
||||
|
||||
msg.msg_accrights = (caddr_t) &newfd;
|
||||
@ -184,7 +184,7 @@ static ssize_t read_fd(int fd, void *ptr, size_t nbytes, int *recvfd)
|
||||
return(n);
|
||||
}
|
||||
|
||||
#ifdef HAVE_MSGHDR_MSG_CONTROL
|
||||
#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
|
||||
if ((cmptr = CMSG_FIRSTHDR(&msg)) != NULL
|
||||
&& cmptr->cmsg_len == CMSG_LEN(sizeof(int))) {
|
||||
if (cmptr->cmsg_level != SOL_SOCKET) {
|
||||
@ -218,7 +218,7 @@ static ssize_t write_fd(int fd, void *ptr, size_t nbytes, int sendfd)
|
||||
struct msghdr msg;
|
||||
struct iovec iov[1];
|
||||
|
||||
#ifdef HAVE_MSGHDR_MSG_CONTROL
|
||||
#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
|
||||
union {
|
||||
struct cmsghdr cm;
|
||||
char control[CMSG_SPACE(sizeof(int))];
|
||||
|
@ -552,7 +552,7 @@ union {
|
||||
msg.msg_control = control_un.control;
|
||||
msg.msg_controllen = sizeof(control_un.control);
|
||||
''',
|
||||
'HAVE_MSGHDR_MSG_CONTROL',
|
||||
'HAVE_STRUCT_MSGHDR_MSG_CONTROL',
|
||||
msg='Checking if we can use msg_control for passing file descriptors',
|
||||
headers='sys/types.h stdlib.h stddef.h sys/socket.h sys/un.h')
|
||||
conf.CHECK_CODE('''
|
||||
@ -1841,7 +1841,7 @@ main() {
|
||||
if conf.CONFIG_SET('HAVE_STATFS_F_FSID'):
|
||||
default_shared_modules.extend(TO_LIST('vfs_fileid'))
|
||||
|
||||
if (conf.CONFIG_SET('HAVE_MSGHDR_MSG_CONTROL') or conf.CONFIG_SET('HAVE_MSGHDR_MSG_ACCTRIGHTS')):
|
||||
if (conf.CONFIG_SET('HAVE_STRUCT_MSGHDR_MSG_CONTROL') or conf.CONFIG_SET('HAVE_MSGHDR_MSG_ACCTRIGHTS')):
|
||||
default_shared_modules.extend(TO_LIST('vfs_aio_fork'))
|
||||
|
||||
if Options.options.with_pthreadpool:
|
||||
|
Reference in New Issue
Block a user