From 0dc045af35b883cf4152fbd1e8cf6c0e6181c68c Mon Sep 17 00:00:00 2001 From: Dmitry Podgorny Date: Sat, 20 Dec 2025 13:14:06 +0200 Subject: [PATCH] conn: Fix cross compilation with mingw Mingw doesn't find netinet/in.h which is not supposed to be used for a windows build. This header is conditionally compiled when _MSC_VER is not defined, however, mingw defines only _WIN32 and not the _MSC_VER. Add also _WIN32 to the condition, so mingw ignores the header and relies on winsock2.h from common.h->sock.h. Fixes #265. --- src/conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conn.c b/src/conn.c index 96968be5..8db7d15d 100644 --- a/src/conn.c +++ b/src/conn.c @@ -21,7 +21,7 @@ */ #include -#ifndef _MSC_VER +#if !defined(_MSC_VER) && !defined(_WIN32) #include #endif #include