X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/759ef658680949d37f3bb3589804e85fae0596f7..36b6fecc4670f4d351cd662a6772a5a196108ceb:/fdpass.c diff --git a/fdpass.c b/fdpass.c index 95685e7..0a11c2c 100644 --- a/fdpass.c +++ b/fdpass.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: fdpass.c,v 1.1 2003/11/29 11:58:49 mdw Exp $ + * $Id$ * * File descriptor passing * @@ -27,14 +27,6 @@ * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: fdpass.c,v $ - * Revision 1.1 2003/11/29 11:58:49 mdw - * File descriptor passing. - * - */ - /*----- Header files ------------------------------------------------------*/ #include @@ -82,11 +74,11 @@ ssize_t fdpass_send(int sock, int fd, const void *p, size_t sz) msg.msg_namelen = 0; msg.msg_iov = &iov; msg.msg_iovlen = 1; - msg.msg_flags = 0; #ifdef HAVE_MSG_ACCRIGHTS msg.msg_accrights = &fd; msg.msg_accrightslen = sizeof(fd); #else + msg.msg_flags = 0; msg.msg_control = buf; msg.msg_controllen = sizeof(buf); cmsg = CMSG_FIRSTHDR(&msg); @@ -130,11 +122,11 @@ ssize_t fdpass_recv(int sock, int *fd, void *p, size_t sz) msg.msg_namelen = 0; msg.msg_iov = &iov; msg.msg_iovlen = 1; - msg.msg_flags = 0; #ifdef HAVE_MSG_ACCRIGHTS msg.msg_accrights = fd; msg.msg_accrightslen = sizeof(*fd); #else + msg.msg_flags = 0; msg.msg_control = buf; msg.msg_controllen = sizeof(buf); #endif