On Monday 01 March 2004 18:55, Juan Lang wrote:

> > additionally
> > link to ws2_32 it builds on MinGW as well as Wine.
> 
> You have to link to ws2_32?  That's interesting, I
> didn't.  I submitted a patch, minus that bit.

Yes you need to, I have tested this. You don't need it on 
Wine because there you somehow get inet_addr indirectly, but
on MinGW (and MSVC) you sure need it otherwise it won't build.

> > MinGW and MSVC versions of winsock2.h have the
> > defines, so
> > I guess we need to add them. Attached patch does so.
> 
> Could you submit to wine-patches?  Thanks!

I intended to do so but I addressed it to wine-devel twice, so 
here it is again. This fixes cross compilation of wsock32.

 -Hans

Changelog:
  add protocol type constants.

Index: include/winsock2.h
===================================================================
RCS file: /home/wine/wine/include/winsock2.h,v
retrieving revision 1.21
diff -u -r1.21 winsock2.h
--- include/winsock2.h	11 Dec 2003 05:16:48 -0000	1.21
+++ include/winsock2.h	2 Mar 2004 09:20:43 -0000
@@ -76,6 +76,21 @@
 #define WS_SO_CONDITIONAL_ACCEPT   0x3002
 #endif
 
+/* protocol types */
+
+#ifndef USE_WS_PREFIX
+#define SOCK_STREAM                1
+#define SOCK_DGRAM                 2
+#define SOCK_RAW                   3
+#define SOCK_RDM                   4
+#define SOCK_SEQPACKET             5
+#else /* USE_WS_PREFIX */
+#define WS_SOCK_STREAM             1
+#define WS_SOCK_DGRAM              2
+#define WS_SOCK_RAW                3
+#define WS_SOCK_RDM                4
+#define WS_SOCK_SEQPACKET          5
+#endif /* USE_WS_PREFIX */
 
 /* option flags per socket */
 

Reply via email to