http://bugs.winehq.org/show_bug.cgi?id=16660
Summary: build broken in dlls/inetcomm/internettransport.c on OpenBSD Product: Wine Version: 1.1.11 Platform: PC OS/Version: OpenBSD Status: NEW Keywords: patch, source Severity: major Priority: P2 Component: build-env AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wwrite-strings -Wpointer-arith -I/usr/local/include -g -O2 -o internettransport.o internettransport.c In file included from internettransport.c:31: ../../include/ws2tcpip.h:60: error: conflicting types for `socklen_t' /usr/include/sys/types.h:163: error: previous declaration of `socklen_t' internettransport.c: In function `InternetTransport_WndProc': internettransport.c:348: error: syntax error before "infd" internettransport.c:379: warning: implicit declaration of function `Include_winsock_h_before_stdlib_h_or_use_the_MSVCRT_library' internettransport.c:379: error: `infd' undeclared (first use in this function) internettransport.c:379: error: (Each undeclared identifier is reported only once internettransport.c:379: error: for each function it appears in.) *** Error code 1
Below patch fixes it. Haven't submitted to wine-patches yet, I got it from the OpenBSD wine port, but I'm not familiar enough with the networking code to know it's right. Would someone mind taking a look? Feel free to submit it yourself if it's right ;-).
diff --git a/include/ws2tcpip.h b/include/ws2tcpip.h index a38ccda..dd7a60c 100644 --- a/include/ws2tcpip.h +++ b/include/ws2tcpip.h @@ -57,7 +57,9 @@ typedef struct WS(addrinfoW) struct WS(addrinfoW)* ai_next; } ADDRINFOW, *PADDRINFOW;
+#ifdef USE_WS_PREFIX typedef int WS(socklen_t); +#undef
typedef ADDRINFOA ADDRINFO, *LPADDRINFO;
http://bugs.winehq.org/show_bug.cgi?id=16660
--- Comment #1 from Austin English austinenglish@gmail.com 2008-12-28 20:01:43 --- Created an attachment (id=18288) --> (http://bugs.winehq.org/attachment.cgi?id=18288) correct patch
Seems it needed a second patch. This is a definite hack, but should lead someone who knows how to fix it in the right direction.
http://bugs.winehq.org/show_bug.cgi?id=16660
David Gerard dgerard@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dgerard@gmail.com
--- Comment #2 from David Gerard dgerard@gmail.com 2009-01-06 16:16:26 --- May or may not be related: make on Cygwin also bombs out in internettransport.c with a similar error - see http://wiki.winehq.org/WineOnWindows?action=recall&rev=60
internettransport.c: In function `InternetTransport_WndProc': internettransport.c:348: error: `Include_winsock_h_before_stdlib_h_or_use_the_MSVCRT_library' undeclared (first use in this function) internettransport.c:348: error: (Each undeclared identifier is reported only once internettransport.c:348: error: for each function it appears in.) internettransport.c:348: error: parse error before "infd" internettransport.c:379: warning: implicit declaration of function `Include_winock_h_before_stdlib_h_or_use_the_MSVCRT_library' internettransport.c:379: error: `infd' undeclared (first use in this function) make[2]: *** [internettransport.o] Error 1 make[2]: Leaving directory `/cygdrive/d/wine-1.1.12/dlls/inetcomm' make[1]: *** [inetcomm] Error 2 make[1]: Leaving directory `/cygdrive/d/wine-1.1.12/dlls' make: *** [dlls] Error 2
Applying attachment 18288 gives:
gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_REENTRANT -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -g -O2 -o internettransport.o internettransport.c In file included from internettransport.c:31: ../../include/ws2tcpip.h:238: error: parse error before "socklen_t" ../../include/ws2tcpip.h:240: error: parse error before "socklen_t" make[2]: *** [internettransport.o] Error 1 make[2]: Leaving directory `/home/fun/wine-1.1.11/dlls/inetcomm' make[1]: *** [inetcomm] Error 2 make[1]: Leaving directory `/home/fun/wine-1.1.11/dlls' make: *** [dlls] Error 2
I suspect the real problem is indeed way back in ./configure .
http://bugs.winehq.org/show_bug.cgi?id=16660
--- Comment #3 from David Gerard dgerard@gmail.com 2009-01-06 16:26:14 --- The similar Cygwin problem is now bug 16833.
http://bugs.winehq.org/show_bug.cgi?id=16660
sebastian sebastia@l00-bugdead-prods.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastia@l00-bugdead- | |prods.de
--- Comment #4 from sebastian sebastia@l00-bugdead-prods.de 2009-02-18 16:37:03 --- *** Bug 17459 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=16660
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #18288|0 |1 is obsolete| |
--- Comment #5 from Austin English austinenglish@gmail.com 2009-03-29 21:25:59 --- Created an attachment (id=20198) --> (http://bugs.winehq.org/attachment.cgi?id=20198) better hack
This fixes most of the problems for me on OpenBSD. Adds one warning though: internettransport.c: In function ‘InternetTransport_Connect’: internettransport.c:149: warning: implicit declaration of function ‘closesocket’
http://bugs.winehq.org/show_bug.cgi?id=16660
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|major |blocker
http://bugs.winehq.org/show_bug.cgi?id=16660
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #20198|0 |1 is obsolete| |
--- Comment #6 from Austin English austinenglish@gmail.com 2009-03-31 01:14:13 --- Created an attachment (id=20221) --> (http://bugs.winehq.org/attachment.cgi?id=20221) slightly better
Still need to fix that closesocket warning...
http://bugs.winehq.org/show_bug.cgi?id=16660
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #7 from Austin English austinenglish@gmail.com 2009-03-31 14:09:34 --- AJ's recent patches fixed this (a6aa7771d3b7db21819ce8f07518f85149404039 & 2e8d68d68301d3f6a4a4874a38d29dd5203161fb)
http://bugs.winehq.org/show_bug.cgi?id=16660
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2009-04-10 11:20:37 --- Closing bugs fixed in 1.1.19.