From 9a54f4b9080da994034dd0c60b31ee23d656e151 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Sat, 13 Dec 2025 12:02:04 +0100 Subject: [PATCH] os: enable UNIX sockets on Mingw32 Mingw32 also supports unix sockets, so no need to disable them here. Since it's now always enabled, follow-up commits can now drop all the extra #ifdef's on UNIXCONN and so reduce complexity. Signed-off-by: Enrico Weigelt, metux IT consult --- include/meson.build | 2 +- os/Xtranssock.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/meson.build b/include/meson.build index 1e486e2ffb..36af68b85c 100644 --- a/include/meson.build +++ b/include/meson.build @@ -200,7 +200,7 @@ if conf_data.get('HAVE_GETPEEREID').to_int() == 0 and conf_data.get('HAVE_GETPEE endif endif -conf_data.set('UNIXCONN', host_machine.system() != 'windows' ? '1' : false) +conf_data.set('UNIXCONN', '1') conf_data.set('IPv6', build_ipv6 ? '1' : false) # potentially tunable - needed also in places that cannot include misc.h diff --git a/os/Xtranssock.c b/os/Xtranssock.c index daa87cbb4d..0f13a45ca1 100644 --- a/os/Xtranssock.c +++ b/os/Xtranssock.c @@ -73,12 +73,14 @@ from the copyright holders. #ifdef XTHREADS #include #endif +#include #include "os/ossock.h" #ifndef WIN32 #if defined(UNIXCONN) +#include #include #include #include @@ -90,12 +92,6 @@ from the copyright holders. #include #endif -#ifdef UNIXCONN -#include -#include -#endif - - #ifndef NO_TCP_H #if defined(linux) || defined(__GLIBC__) #include @@ -120,6 +116,8 @@ from the copyright holders. #include #include +#include + #undef EADDRINUSE #define EADDRINUSE WSAEADDRINUSE #undef EWOULDBLOCK