Re: [Mingw-w64-public] [PATCH] Revert "headers: Move IP_MREQ from _ip_mreq1.h to ws2ipdef.h."
在 6/26/21 6:10 PM, Biswapriyo Nath 写道: Thanks for the explanation. Two questions. 1. If I include winsock.h for ip_mreq it compiles. But if I include winsock2.h for ip_mreq it does not compile. Does winsock2.h need _ip_mreq1.h to be included? It is necessary to include ws2ipdef.h after winsock2.h. At least this is the case with MSVC. #include #include 2. If I include winsock.h or winsock2.h for ipv6_mreq neither works. Does ipv6_mreq need same treatment as ip_mreq? My presumption is that winsock is too old to support IPv6 (note it even predates Windows 95). But according to MS docs[1][2] ws2tcpip.h should be include for ip_mreq and ipv6_mreq both. I was just testing the aforementioned cases. [1]: https://docs.microsoft.com/en-us/windows/win32/api/ws2ipdef/ns-ws2ipdef-ip_mreq [2]: https://docs.microsoft.com/en-us/windows/win32/api/ws2ipdef/ns-ws2ipdef-ipv6_mreq -- Best regards, Liu Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Revert "headers: Move IP_MREQ from _ip_mreq1.h to ws2ipdef.h."
Thanks for the explanation. Two questions. 1. If I include winsock.h for ip_mreq it compiles. But if I include winsock2.h for ip_mreq it does not compile. Does winsock2.h need _ip_mreq1.h to be included? 2. If I include winsock.h or winsock2.h for ipv6_mreq neither works. Does ipv6_mreq need same treatment as ip_mreq? But according to MS docs[1][2] ws2tcpip.h should be include for ip_mreq and ipv6_mreq both. I was just testing the aforementioned cases. [1]: https://docs.microsoft.com/en-us/windows/win32/api/ws2ipdef/ns-ws2ipdef-ip_mreq [2]: https://docs.microsoft.com/en-us/windows/win32/api/ws2ipdef/ns-ws2ipdef-ipv6_mreq ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Revert "headers: Move IP_MREQ from _ip_mreq1.h to ws2ipdef.h."
在 6/26/21 1:10 PM, Biswapriyo Nath 写道: Forgot the patch file. Thanks. Pushed to master. The Windows 8 SDK actually duplicates the definition of `struct ip_mreq` in both and , so I think it is not valid to remove it there. We have the '_ip_mreq1.h' which is nothing but duplication. This also means that if one includes both and , they will get multiple definition errors about `struct ip_mreq`, but that is MS behavior too. -- Best regards, Liu Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Revert "headers: Move IP_MREQ from _ip_mreq1.h to ws2ipdef.h."
Forgot the patch file. From 57fb78c373e609712ae159ac7b9ed51259afaa4b Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Sat, 26 Jun 2021 10:27:17 +0530 Subject: [PATCH] Revert "headers: Move IP_MREQ from _ip_mreq1.h to ws2ipdef.h." This reverts commit 0c7108c439fcf349ec172843b022ccec5cef5da4 This revert fixes the build of SDL_net for x86 architecture. Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/include/psdk_inc/_ip_mreq1.h | 9 + mingw-w64-headers/include/ws2ipdef.h | 5 - 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mingw-w64-headers/include/psdk_inc/_ip_mreq1.h b/mingw-w64-headers/include/psdk_inc/_ip_mreq1.h index 5ca7bb3..1840ecb 100644 --- a/mingw-w64-headers/include/psdk_inc/_ip_mreq1.h +++ b/mingw-w64-headers/include/psdk_inc/_ip_mreq1.h @@ -4,9 +4,18 @@ * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ +/* + * Shared data types between winsock and winsock2 + */ + #ifndef _MINGW_IP_MREQ1_H #define _MINGW_IP_MREQ1_H #include +typedef struct ip_mreq { + struct in_addr imr_multiaddr; + struct in_addr imr_interface; +} IP_MREQ, *PIP_MREQ; + #endif /* _MINGW_IP_MREQ1_H */ diff --git a/mingw-w64-headers/include/ws2ipdef.h b/mingw-w64-headers/include/ws2ipdef.h index 188b2f4..d440bbc 100644 --- a/mingw-w64-headers/include/ws2ipdef.h +++ b/mingw-w64-headers/include/ws2ipdef.h @@ -192,11 +192,6 @@ typedef enum _MULTICAST_MODE_TYPE { MCAST_EXCLUDE } MULTICAST_MODE_TYPE; -typedef struct ip_mreq { - IN_ADDR imr_multiaddr; - IN_ADDR imr_interface; -} IP_MREQ, *PIP_MREQ; - typedef struct ip_mreq_source { IN_ADDR imr_multiaddr; IN_ADDR imr_sourceaddr; -- 2.32.0 ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [PATCH] Revert "headers: Move IP_MREQ from _ip_mreq1.h to ws2ipdef.h."
My apology for this mistake. I am not sure why this causes build issue in SDL_net https://github.com/msys2/MINGW-packages/issues/8759. /cc Ozkan Sezer ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public