diff options
Diffstat (limited to 'nt/inc/sys/socket.h')
-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..de282c467e6 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 >= 5000002L +/* 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 |