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 <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-12-13 15:30:16 +01:00
committed by Enrico Weigelt
parent ee73f84c65
commit 7ba4f6a2b6
2 changed files with 4 additions and 4 deletions

View File

@@ -235,12 +235,12 @@ typedef struct _Xtransport_table {
#pragma clang diagnostic ignored "-Wunused-function" #pragma clang diagnostic ignored "-Wunused-function"
#endif #endif
#ifndef WIN32 #ifdef UNIXCONN
static int trans_mkdir ( static int trans_mkdir (
const char *, /* path */ const char *, /* path */
int /* mode */ int /* mode */
); );
#endif #endif /* UNIXCONN */
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic pop #pragma clang diagnostic pop

View File

@@ -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 * it's not save if the directory has non-root ownership or the sticky
* bit cannot be set and fail. * bit cannot be set and fail.
*/ */
#ifndef WIN32 #ifdef UNIXCONN
static int static int
trans_mkdir(const char *path, int mode) trans_mkdir(const char *path, int mode)
{ {
@@ -389,4 +389,4 @@ trans_mkdir(const char *path, int mode)
/* In all other cases, fail */ /* In all other cases, fail */
return -1; return -1;
} }
#endif #endif /* UNIXCONN */