Skip to content

Commit 7ff6bdc

Browse files
Merge pull request microsoft#32 from stepas-toliautas/gcc510-compat
Update mspms.h to be compatible with MinGW GCC <= 5.1.0
2 parents 1dbbaee + 12244d3 commit 7ff6bdc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/include/mspms.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ DEFINE_GUID(
4949
#endif
5050

5151
#include <WS2tcpip.h>
52+
#if !defined(_WS2IPDEF_) && !defined(_INC_WS2IPDEF) // latter for GCC 4.9.2
53+
54+
typedef u_short ADDRESS_FAMILY;
55+
56+
typedef union _SOCKADDR_INET {
57+
SOCKADDR_IN Ipv4;
58+
SOCKADDR_IN6 Ipv6;
59+
ADDRESS_FAMILY si_family;
60+
} SOCKADDR_INET, *PSOCKADDR_INET;
61+
62+
#endif
5263
#include <windows.h>
5364

5465

@@ -73,6 +84,15 @@ DEFINE_GUID(
7384
#ifndef _Outptr_
7485
#define _Outptr_
7586
#endif
87+
#ifndef _In_opt_
88+
#define _In_opt_
89+
#endif
90+
#ifndef _Out_opt_
91+
#define _Out_opt_
92+
#endif
93+
#ifndef _Outptr_opt_
94+
#define _Outptr_opt_
95+
#endif
7696

7797

7898
#define MSPMS_MAX_NAME_LENGTH 256

0 commit comments

Comments
 (0)