[Bug 22920] New: Missing typedef keywords in ws2ipdef.h resulting in multiply-defined symbols

wine-bugs at winehq.org wine-bugs at winehq.org
Fri May 28 17:37:49 CDT 2010


http://bugs.winehq.org/show_bug.cgi?id=22920

           Summary: Missing typedef keywords in ws2ipdef.h resulting in
                    multiply-defined symbols
           Product: Wine
           Version: 1.1.42
          Platform: x86
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: winsock
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: rmcdonald at bittorrent.com


I was building a program using Winelib and ran into multiply-defined symbols at
link time.  I resolved them by modifying /usr/include/wine/windows/ws2ipdef.h
as follows:

136c136
< struct WS(ip_mreq)
---
> typedef struct WS(ip_mreq)
142c142
< struct WS(ip_mreq_source) {
---
> typedef struct WS(ip_mreq_source) {
148c148
< struct WS(ip_msfilter) {
---
> typedef struct WS(ip_msfilter) {

Here's the section of the file causing the problem:

/*
 * Multicast group information
 */

struct WS(ip_mreq)
{
    struct WS(in_addr) imr_multiaddr;
    struct WS(in_addr) imr_interface;
} WS(IP_MREQ), *WS(PIP_MREQ);

struct WS(ip_mreq_source) {
    struct WS(in_addr) imr_multiaddr;
    struct WS(in_addr) imr_sourceaddr;
    struct WS(in_addr) imr_interface;
} WS(IP_MREQ_SOURCE), *WS(PIP_MREQ_SOURCE);

struct WS(ip_msfilter) {
    struct WS(in_addr) imsf_multiaddr;
    struct WS(in_addr) imsf_interface;
    ULONG              imsf_fmode;
    ULONG              imsf_numsrc;
    struct WS(in_addr) imsf_slist[1];
} WS(IP_MSFILTER), *WS(PIP_MSFILTER);

Without the typedef keywords, this code was defining a global variable from
every source file that included it.

I browsed the source code at
http://source.winehq.org/git/wine.git/?a=tree;f=include;h=1e4dce3adfe9c87b57384982958038e11ccaffd6;hb=HEAD
and saw the head revision for this file and confirmed this part of the file is
the same as my copy.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list