From 7ba4f6a2b66416e5cf984acfd0527aa749803d8a Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Sat, 13 Dec 2025 15:30:16 +0100 Subject: [PATCH] os: xtrans: define trans_mkdir() when UNIXCONN is enabled trans_mkdir() is needed for unix sockets, so the correct switch is UNIXCONN, instead of WIN32. Signed-off-by: Enrico Weigelt, metux IT consult --- os/Xtransint.h | 4 ++-- os/Xtransutil.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/os/Xtransint.h b/os/Xtransint.h index 5918020100..20cf9a9502 100644 --- a/os/Xtransint.h +++ b/os/Xtransint.h @@ -235,12 +235,12 @@ typedef struct _Xtransport_table { #pragma clang diagnostic ignored "-Wunused-function" #endif -#ifndef WIN32 +#ifdef UNIXCONN static int trans_mkdir ( const char *, /* path */ int /* mode */ ); -#endif +#endif /* UNIXCONN */ #ifdef __clang__ #pragma clang diagnostic pop diff --git a/os/Xtransutil.c b/os/Xtransutil.c index 58192e4e18..706b5fee45 100644 --- a/os/Xtransutil.c +++ b/os/Xtransutil.c @@ -240,7 +240,7 @@ int _XSERVTransConvertAddress(int *familyp, int *addrlenp, Xtransaddr **addrp) * it's not save if the directory has non-root ownership or the sticky * bit cannot be set and fail. */ -#ifndef WIN32 +#ifdef UNIXCONN static int trans_mkdir(const char *path, int mode) { @@ -389,4 +389,4 @@ trans_mkdir(const char *path, int mode) /* In all other cases, fail */ return -1; } -#endif +#endif /* UNIXCONN */