develooper Front page | perl.perl5.porters | Postings from November 2011

RE: Windows VC6 build broken by Socket changes

Thread Previous | Thread Next
From:
Steve Hay
Date:
November 8, 2011 00:27
Subject:
RE: Windows VC6 build broken by Socket changes
Message ID:
1B32FF956ABF414C9BCE5E487A1497E70B815E78@ukmail02.planit.group
Jan Dubois wrote on 2011-11-08:
> On Mon, 07 Nov 2011, Jan Dubois wrote:
>> On Mon, 07 Nov 2011, Steve Hay wrote:
>>> The changes to Socket made in 4f5bb87fb7 do not compile with the
>>> Windows VC6 compiler:
>> 
>> It works fine for me, but I always use the include files from the
>> 2003 Platform SDK with VC6, which have updated winsock headers.
>> 
>> I have in the past fixed a similar issue by patching our own
>> win32/include/sys/socket.h file with information from the SDK:
>> 
>>     http://perl5.git.perl.org/perl.git/commitdiff/1ab9ebc1
>> 
>> I'll have a look later today or tomorrow to fix the issue in a
>> similar manner (unless you want to have a go at it first :) ).
> 
> Here is a minimal patch to get things to compile with plain VC6
> without Platform SDK installed:
> 
> index 3b92b13..20d1546
> --- a/win32/include/sys/socket.h
> +++ b/win32/include/sys/socket.h
> @@ -35,6 +35,14 @@
>          * version and redefine sockaddr_in6 to point to this one
>          * instead for compiling e.g. Socket.xs.
>          */
> + +       /* Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP
> */ + +       typedef struct ipv6_mreq { +           struct in_addr6
> ipv6mr_multiaddr;  /* IPv6 multicast address */ +           unsigned int
>    ipv6mr_interface;  /* Interface index */ +       } IPV6_MREQ; +
>         struct my_sockaddr_in6 {
>             short   sin6_family;        /* AF_INET6 */
>             u_short sin6_port;          /* Transport level port number
> */
> 

Yes, that works for me. (I had been trying something similar already, but using in6_addr, which VC6 also doesn't define, as per the later header files... I hadn't thought of simply using in_addr6 instead!)

Thanks for looking at this. I will await the full patch.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About