diff options
| author | Eli Zaretskii | 2018-07-28 15:34:00 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2018-07-28 15:34:00 +0300 |
| commit | 024d20f81e643fe1739d28d16501a8c4f7a860c6 (patch) | |
| tree | ffd64f180b8ac8d5f07d3345ab7edec8c19f496a /lib-src | |
| parent | 38b67488566de6f7c9b405ae62664b16ab135713 (diff) | |
| download | emacs-024d20f81e643fe1739d28d16501a8c4f7a860c6.tar.gz emacs-024d20f81e643fe1739d28d16501a8c4f7a860c6.zip | |
Fix compilation with mingw.org's MinGW 5.x headers
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/pop.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib-src/pop.c b/lib-src/pop.c index 10aac957d4b..0b9204576bd 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c | |||
| @@ -30,8 +30,12 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 30 | #include "ntlib.h" | 30 | #include "ntlib.h" |
| 31 | #undef _WIN32_WINNT | 31 | #undef _WIN32_WINNT |
| 32 | #define _WIN32_WINNT 0x0501 /* for getaddrinfo stuff */ | 32 | #define _WIN32_WINNT 0x0501 /* for getaddrinfo stuff */ |
| 33 | #include <winsock2.h> | 33 | #if defined __MINGW32_VERSION && __MINGW32_VERSION >= 5000000L |
| 34 | #include <ws2tcpip.h> | 34 | # include <windows.h> |
| 35 | #else | ||
| 36 | # include <winsock2.h> | ||
| 37 | #endif | ||
| 38 | # include <ws2tcpip.h> | ||
| 35 | #undef getaddrinfo | 39 | #undef getaddrinfo |
| 36 | #define getaddrinfo sys_getaddrinfo | 40 | #define getaddrinfo sys_getaddrinfo |
| 37 | #undef freeaddrinfo | 41 | #undef freeaddrinfo |