bug in <sys/un.h>

Eric Blake eblake@redhat.com
Thu May 30 21:51:00 GMT 2013


On 05/30/2013 02:03 PM, Corinna Vinschen wrote:
>> so that the compiler really is complaining about two different
>> incompatible 'struct msghdr' layouts.  I'm not quite sure what the fix
>> should be, [...]
> 
> Try this:
> 
> Index: cygwin/if.h
> ===================================================================
> RCS file: /cvs/src/src/winsup/cygwin/include/cygwin/if.h,v
> retrieving revision 1.11
> diff -u -p -r1.11 if.h
> --- cygwin/if.h	21 Jan 2013 04:38:30 -0000	1.11
> +++ cygwin/if.h	30 May 2013 20:02:56 -0000
> @@ -16,7 +16,7 @@ extern "C" {
>  #endif /* __cplusplus */
>  
>  #include <sys/types.h>
> -#include <sys/socket.h>
> +#include <cygwin/socket.h>

Yep, that appears to do the trick for both my STC and the original
program.  Thanks for hunting down an elegant solution.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20130530/48e40f10/attachment.sig>


More information about the Cygwin mailing list