wine-devel digest, Vol 1 #445 - 9 msgs
Francois Gouget
fgouget at free.fr
Thu Aug 30 11:48:33 CDT 2001
On Thu, 30 Aug 2001, Robert Lunnon wrote:
> Attempt 2 :-)
>
>
> I am trying to get winsock to work under Solaris and need a little help.
>
> When connecting, the call to connect doesn't generate a syn packet as expected, The problem
> appears to be WSOCK32_socket, where the type of socket is passed as type 1 for a tcp service,
> as it turns out the Solaris header file defines SOCK_STREAM as 2 and SOCK_DGRAM as 1 which
> makes the subsequent call to connect succeed without establishing a connection because a UDP
> endpoint was created instead of a tcp one.
>
> Now to find out where SOCK_STREAM is getting defined as 1 :-/
I believe that the problem is that SOCK_STREAM==1 SOCK_DGRAM==2 on
windows and linux. So WSOCK32_socket assumed that the type parameter
does not need any conversion, which seems to be wrong on Solaris.
Try the attached patch.
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
Demander si un ordinateur peut penser revient à demander
si un sous-marin peut nager.
-------------- next part --------------
Index: dlls/winsock/socket.c
===================================================================
RCS file: /home/wine/wine/dlls/winsock/socket.c,v
retrieving revision 1.59
diff -u -r1.59 socket.c
--- dlls/winsock/socket.c 2001/08/24 21:33:58 1.59
+++ dlls/winsock/socket.c 2001/08/30 15:39:11
@@ -2175,9 +2156,15 @@
/* check the socket type */
switch(type)
{
- case SOCK_STREAM:
- case SOCK_DGRAM:
- case SOCK_RAW: break;
+ case WS_SOCK_STREAM:
+ type=SOCK_STREAM;
+ break;
+ case WS_SOCK_DGRAM:
+ type=SOCK_STREAM;
+ break;
+ case WS_SOCK_RAW:
+ type=SOCK_STREAM;
+ break;
default: SetLastError(WSAESOCKTNOSUPPORT);
return INVALID_SOCKET;
}
More information about the wine-devel
mailing list