From ff915d457bc4ff9b8854a4c163c4ef26742debf3 Mon Sep 17 00:00:00 2001
From: Francois Gouget <fgouget@free.fr>
Date: Wed, 31 Mar 2004 19:58:46 +0000
Subject: [PATCH] Make sure ip_mreq is not exported by winsock2.h. Add ip_mreq,
 ip_mreq_source and ip_msfilter to ws2tcpip.h.

---
 include/winsock.h  |  2 ++
 include/ws2tcpip.h | 24 ++++++++++++++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/include/winsock.h b/include/winsock.h
index 66c33d21670..02a6cc59c04 100644
--- a/include/winsock.h
+++ b/include/winsock.h
@@ -596,11 +596,13 @@ typedef struct WS(sockaddr_in)
  * Multicast group information
  */
 
+#if !defined(__WINE_WINSOCK2__)
 struct WS(ip_mreq)
 {
     struct WS(in_addr) imr_multiaddr;
     struct WS(in_addr) imr_interface;
 };
+#endif
 
 /*
  * WSAStartup
diff --git a/include/ws2tcpip.h b/include/ws2tcpip.h
index 5b08dbba3ec..4bd03fcd081 100644
--- a/include/ws2tcpip.h
+++ b/include/ws2tcpip.h
@@ -28,6 +28,30 @@
 /* FIXME: This gets defined by some Unix (Linux) header and messes things */
 #undef s6_addr
 
+/*
+ * Multicast group information
+ */
+
+struct WS(ip_mreq)
+{
+    struct WS(in_addr) imr_multiaddr;
+    struct WS(in_addr) imr_interface;
+};
+
+struct WS(ip_mreq_source) {
+    struct WS(in_addr) imr_multiaddr;
+    struct WS(in_addr) imr_sourceaddr;
+    struct WS(in_addr) imr_interface;
+};
+
+struct WS(ip_msfilter) {
+    struct WS(in_addr) imsf_multiaddr;
+    struct WS(in_addr) imsf_interface;
+    u_long             imsf_fmode;
+    u_long             imsf_numsrc;
+    struct WS(in_addr) imsf_slist[1];
+};
+
 typedef struct WS(in_addr6)
 {
    u_char s6_addr[16];   /* IPv6 address */
-- 
2.24.1