Skip to content

Commit

Permalink
Makefile.mk: restore _mingw.h to set _WIN32_WINNT
Browse files Browse the repository at this point in the history
In 8.4.0 we deleted `_mingw.h` as part of purging old-mingw support.
Turns out `_mingw.h` had the side-effect of setting a default
`_WIN32_WINNT` value expected by `lib/config-win32.h` to enable
`getaddinfo` support in `Makefile.mk` mingw-w64 builds. This caused
disabling support for this unless specifying the value manually.

Restore this header and update its comment to tell why we continue
to need it.

Regression from 3802910 curl#11625

Reported-by: zhengqwe on github
Helped-by: Nico Rieck
Fixes curl#12134
Fixes curl#12136
Closes #xxxxx
  • Loading branch information
vszakats committed Oct 27, 2023
1 parent a426b50 commit efc1b0e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/curl_setup.h
Expand Up @@ -28,6 +28,11 @@
#define CURL_NO_OLDIES
#endif

/* Set default _WIN32_WINNT */
#ifdef __MINGW32__
#include <_mingw.h>
#endif

/*
* Disable Visual Studio warnings:
* 4127 "conditional expression is constant"
Expand Down

0 comments on commit efc1b0e

Please sign in to comment.