From 4729c8b1e2be6e970b63ec724661eaee6b746b19 Mon Sep 17 00:00:00 2001 From: Jasem Mutlaq Date: Sat, 25 Nov 2023 11:03:39 +0300 Subject: [PATCH] Another attempt at fixing MINGW32. Needs to test with CYGWIN --- libs/indiclient/baseclient.cpp | 2 +- libs/indicore/indiutility.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/indiclient/baseclient.cpp b/libs/indiclient/baseclient.cpp index 8f058dee93..640014e2b1 100644 --- a/libs/indiclient/baseclient.cpp +++ b/libs/indiclient/baseclient.cpp @@ -317,7 +317,7 @@ bool BaseClient::connectServer() IDLog("INDI::BaseClient::connectServer: creating new connection...\n"); -#if !defined (_WIN32) && !defined (_WINDOWS) +#if !defined (_WIN32) // System with unix support automatically connect over unix domain if (d->cServer != "localhost" || d->cServer != "127.0.0.1" || d->connectToHostAndWait("localhost:", d->cPort) == false) #endif diff --git a/libs/indicore/indiutility.h b/libs/indicore/indiutility.h index c07e192b9c..f418b5c7c9 100644 --- a/libs/indicore/indiutility.h +++ b/libs/indicore/indiutility.h @@ -64,7 +64,8 @@ inline static size_t indi_strlcpy(char * dst, const char * src, size_t maxlen) // C++ #ifdef __cplusplus -#if defined (_WIN32) || defined (_WINDOWS) +// JM 2023.11.25: Not available in Vanilla Windows (Visual Studio 2022) but available with MINGW? How does this affect CYGWIN? +#if defined (_WIN32) && !defined (__MINGW32__) typedef int mode_t; #endif