Patch - check for msghdr.msg_control on Sparc-Solaris

Francois Gouget fgouget at free.fr
Thu May 16 15:53:42 CDT 2002


On Thu, 16 May 2002 Warren_Baird at cimmetry.com wrote:

>
>
>
> ChangeLog:
>
>     - added a test for the msg_control field in struct msghdr
>       (does't appear in sparc-solaris)

I think it would be better to do it using a technique similar to how it
is done in scheduler/client.c on line 255:


#ifdef HAVE_MSGHDR_ACCRIGHTS
    msghdr.msg_accrights    = (void *)&fd;
    msghdr.msg_accrightslen = sizeof(fd);
#else  /* HAVE_MSGHDR_ACCRIGHTS */
    cmsg.len   = sizeof(cmsg);
    cmsg.level = SOL_SOCKET;
    cmsg.type  = SCM_RIGHTS;
    cmsg.fd    = fd;
    msghdr.msg_control    = &cmsg;
    msghdr.msg_controllen = sizeof(cmsg);
    msghdr.msg_flags      = 0;
#endif  /* HAVE_MSGHDR_ACCRIGHTS */


--
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
                  Dieu dit: "M-x Lumière". Et la lumière fut.




More information about the wine-devel mailing list