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@winehq.org ReportedBy: rmcdonald@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=1e4dce3adfe9c87b57... and saw the head revision for this file and confirmed this part of the file is the same as my copy.
http://bugs.winehq.org/show_bug.cgi?id=22920
Robert McDonald rmcdonald@bittorrent.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rmcdonald@bittorrent.com
http://bugs.winehq.org/show_bug.cgi?id=22920
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|rmcdonald@bittorrent.com |
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com 2010-05-28 17:42:40 --- Feel free to send a patch to wine-patches@winehq.org (http://wiki.winehq.org/SubmittingPatches)
http://bugs.winehq.org/show_bug.cgi?id=22920
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |adys.wh@gmail.com
--- Comment #2 from Jerome Leclanche adys.wh@gmail.com 2012-03-08 09:34:24 CST --- Did you send a patch?
http://bugs.winehq.org/show_bug.cgi?id=22920
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source
http://bugs.winehq.org/show_bug.cgi?id=22920
--- Comment #3 from Robert McDonald rmcdonald@bittorrent.com 2012-03-08 11:49:48 CST --- (In reply to comment #2)
Did you send a patch?
I probably did not - I don't think I had read enough on Wine development practices at that time.
http://bugs.winehq.org/show_bug.cgi?id=22920
--- Comment #4 from Jerome Leclanche adys.wh@gmail.com 2012-03-08 12:02:13 CST --- If you (do not) want to send a patch you have to say so clearly in the bug, so that developers know whether to take care of the bug or not.
http://bugs.winehq.org/show_bug.cgi?id=22920
--- Comment #5 from Robert McDonald rmcdonald@bittorrent.com 2012-03-09 20:34:15 CST --- Sorry about that - looks like I must have submitted a patch.
commit ef6d668d6312b5f2c8423b5b1e596c44f19a1ff3 Author: Robert McDonald xxxxxxxxx@xxxxxxx Date: Wed Jun 2 12:07:50 2010 -0700
include: Add missing typedef keyword to avoid multiply-defined symbols.
http://bugs.winehq.org/show_bug.cgi?id=22920
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |ef6d668d6312b5f2c8423b5b1e5 | |96c44f19a1ff3 Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #6 from Jerome Leclanche adys.wh@gmail.com 2012-03-14 13:04:01 CDT --- Fixed then
http://bugs.winehq.org/show_bug.cgi?id=22920
--- Comment #7 from Alexandre Julliard julliard@winehq.org 2012-03-16 14:08:39 CDT --- Closing bugs fixed in 1.5.0.
http://bugs.winehq.org/show_bug.cgi?id=22920
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2012-03-16 17:11:12 CDT --- Really closing bugs fixed in 1.5.0.