diff options
author | Eli Zaretskii <eliz@gnu.org> | 2018-07-28 15:34:00 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2018-07-28 15:34:00 +0300 |
commit | 024d20f81e643fe1739d28d16501a8c4f7a860c6 (patch) | |
tree | ffd64f180b8ac8d5f07d3345ab7edec8c19f496a /nt/inc/sys | |
parent | 38b67488566de6f7c9b405ae62664b16ab135713 (diff) | |
download | emacs-024d20f81e643fe1739d28d16501a8c4f7a860c6.tar.gz emacs-024d20f81e643fe1739d28d16501a8c4f7a860c6.tar.bz2 emacs-024d20f81e643fe1739d28d16501a8c4f7a860c6.zip |
Fix compilation with mingw.org's MinGW 5.x headers
Diffstat (limited to 'nt/inc/sys')
-rw-r--r-- | nt/inc/sys/socket.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h index 2582cbdaef1..3ea9542b05c 100644 --- a/nt/inc/sys/socket.h +++ b/nt/inc/sys/socket.h @@ -49,6 +49,11 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ #define timeval ws_timeval #endif +#if defined __MINGW32_VERSION && __MINGW32_VERSION >= 5000000L +/* Need winerror.h before winsock2.h with mingw.org's MinGW 5.x, + otherwise some error codes are not defined. */ +# include <winerror.h> +#endif #include <winsock2.h> #include <ws2tcpip.h> /* process.c uses uint16_t (from C99) for IPv6, but |