CVS won't compile with wine/dlls/winsock socket.c ws2_32.spec patch applied
wine compiles fine with my system until this patch is applied http://www.winehq.com/hypermail/wine-cvs/2002/04/0087.html after it is applied it stops with the following errors
socket.c: In function `WSASendTo': socket.c:1990: sizeof applied to an incomplete type socket.c:2000: arithmetic on pointer to an incomplete type socket.c:2000: dereferencing pointer to incomplete type socket.c:2001: arithmetic on pointer to an incomplete type socket.c:2001: dereferencing pointer to incomplete type socket.c: In function `WSARecvFrom': socket.c:3286: sizeof applied to an incomplete type socket.c:3295: arithmetic on pointer to an incomplete type socket.c:3295: dereferencing pointer to incomplete type socket.c:3296: arithmetic on pointer to an incomplete type socket.c:3296: dereferencing pointer to incomplete type make: *** [socket.o] Error 1
I changed directory to dlls/winsock and did make clean make depend make I have attached a log of the session if that will help it seems it doesn't like this code and I (moron user ) can't see anything wrong with it .
int i, n, fd, err = WSAENOTSOCK; struct iovec* iovec; struct msghdr msghdr;
TRACE ("socket %04x, wsabuf %p, nbufs %ld, flags %ld, to %p, tolen %d, ovl %p, func %p\n", s, lpBuffers, dwBufferCount, dwFlags, to, tolen, lpOverlapped, lpCompletionRoutine);
fd = _get_sock_fd(s);
if ( fd == -1 ) goto error;
iovec = WS_ALLOC ( dwBufferCount * sizeof (struct iovec) );
I welcome your advice, fixes or flames Tony Lambregts Script started on Mon Apr 8 11:29:24 2002 [tony(a)tony winsock]$ make clean rm -f *.o *.a *.so *.ln \#*\# *~ *% .\#* *.bak *.orig *.rej *.flc *.spec.c *.spec.def *.glue.c y.tab.c y.tab.h lex.yy.c core tests/testlist.c [tony(a)tony winsock]$ make depend ../../tools/makedep -I. -I. -I../../include -I../../include -C. async.c socket.c -C. [tony(a)tony winsock]$ make LD_LIBRARY_PATH="../../unicode:$LD_LIBRARY_PATH" ../../tools/winebuild/winebuild -fPIC -L../../dlls -o winsock.spec.c -spec winsock.spec gcc -c -I. -I. -I../../include -I../../include -g -O2 -Wall -fPIC -D__WINE__ -DUSE_WS_PREFIX -D_REENTRANT -I/usr/X11R6/include -o winsock.spec.o winsock.spec.c gcc -c -I. -I. -I../../include -I../../include -g -O2 -Wall -fPIC -D__WINE__ -DUSE_WS_PREFIX -D_REENTRANT -I/usr/X11R6/include -o async.o async.c gcc -c -I. -I. -I../../include -I../../include -g -O2 -Wall -fPIC -D__WINE__ -DUSE_WS_PREFIX -D_REENTRANT -I/usr/X11R6/include -o socket.o socket.c socket.c: In function `WSASendTo': socket.c:1990: sizeof applied to an incomplete type socket.c:2000: arithmetic on pointer to an incomplete type socket.c:2000: dereferencing pointer to incomplete type socket.c:2001: arithmetic on pointer to an incomplete type socket.c:2001: dereferencing pointer to incomplete type socket.c: In function `WSARecvFrom': socket.c:3286: sizeof applied to an incomplete type socket.c:3295: arithmetic on pointer to an incomplete type socket.c:3295: dereferencing pointer to incomplete type socket.c:3296: arithmetic on pointer to an incomplete type socket.c:3296: dereferencing pointer to incomplete type make: *** [socket.o] Error 1 [tony(a)tony winsock]$ exit exit Script done on Mon Apr 8 11:30:32 2002
On Mon, 8 Apr 2002, Tony Lambregts wrote:
wine compiles fine with my system until this patch is applied http://www.winehq.com/hypermail/wine-cvs/2002/04/0087.html
It seems that "struct iovec" is undefined on your system. What OS/hardware is this? Can you find out which header file defines it on your system ? Normally (on Linux) it should be in <bits/uio.h>, included via <sy/uio.h>, which is included via <sys/socket.h>. Also, please send me your wine include/config.h file. Martin -- Martin Wilck Phone: +49 5251 8 15113 Fujitsu Siemens Computers Fax: +49 5251 8 20409 Heinz-Nixdorf-Ring 1 mailto:Martin.Wilck(a)Fujitsu-Siemens.com D-33106 Paderborn http://www.fujitsu-siemens.com/primergy
Please try the following mini-patch: --- dlls/winsock/socket.c.ORIG Tue Apr 9 10:50:50 2002 +++ dlls/winsock/socket.c Tue Apr 9 10:51:03 2002 @@ -57,6 +57,7 @@ #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #endif +#include <sys/uio.h> #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif -- Martin Wilck Phone: +49 5251 8 15113 Fujitsu Siemens Computers Fax: +49 5251 8 20409 Heinz-Nixdorf-Ring 1 mailto:Martin.Wilck(a)Fujitsu-Siemens.com D-33106 Paderborn http://www.fujitsu-siemens.com/primergy
participants (2)
-
Martin Wilck -
Tony Lambregts