diff options
author | Michael Adam <obnox@samba.org> | 2014-05-31 12:04:05 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-06-02 22:48:12 +0200 |
commit | 86be491912811502fa29720128341f91a38266c1 (patch) | |
tree | 7743cdafe016115d04e009010ec0bf99e90f7245 | |
parent | abedc7116e8a096398e3f8e07b03ba832088e014 (diff) | |
download | samba-86be491912811502fa29720128341f91a38266c1.tar.gz |
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>
-rw-r--r-- | source3/modules/vfs_aio_fork.c | 8 | ||||
-rw-r--r-- | source3/wscript | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c index c3dc188ec98..d8a99b00359 100644 --- a/source3/modules/vfs_aio_fork.c +++ b/source3/modules/vfs_aio_fork.c @@ -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))]; diff --git a/source3/wscript b/source3/wscript index 3b38d19ae9d..25dfa2e2075 100644 --- a/source3/wscript +++ b/source3/wscript @@ -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: |