[Mono-list] [Patch] mono/io-layer/daemon-messages.c - won't
compile on FreeBSD 4.6-Release
Dick Porter
dick@ximian.com
17 Jul 2002 17:56:15 +0100
On Wed, 2002-07-17 at 12:09, Andreas Kohn wrote:
> Hello!
>
> I tried to compile mono under FreeBSD 4.6-Release, and gcc didn't want to
> compile
> mono/io-layer/daemon-messages.c because
> -struct iovec was not defined
> -MSG_NOSIGNAL was not defined.
>
> Could someone test this patch for correctness and apply it if neccessary?
done.
>
> +#ifndef iovec
> +#include <sys/uio.h>
> +#endif
> +
added.
> #include <mono/io-layer/wapi.h>
> #include <mono/io-layer/daemon-messages.h>
>
> @@ -147,6 +151,9 @@
> struct iovec iov;
> struct cmsghdr *cmsg;
> guchar cmsgdata[CMSG_SPACE (sizeof(int)*3)];
> +#ifndef HAVE_MSG_NOSIGNAL
> + void (*old_sigpipe)(int);
> +#endif
>
> msg.msg_name=NULL;
> msg.msg_namelen=0;
> @@ -157,16 +164,12 @@
> msg.msg_flags=0;
> iov.iov_base=req;
> iov.iov_len=sizeof(WapiHandleRequest);
> -
> -#ifndef HAVE_MSG_NOSIGNAL
> - void (*old_sigpipe)(int);
> -#endif
I don't see this in the code.
>
> #ifdef HAVE_MSG_NOSIGNAL
> ret=recvmsg (fd, &msg, MSG_NOSIGNAL);
> #else
> old_sigpipe = signal (SIGPIPE, SIG_IGN);
> - ret=recvmsg (fd, &msg, MSG_NOSIGNAL);
> + ret=recvmsg (fd, &msg, 0);
> signal (SIGPIPE, old_sigpipe);
> #endif
> if(ret==-1 || ret!= sizeof(WapiHandleRequest)) {
whoops, cut&paste bug there, but again no sign of "old_sigpipe".
- Dick