diff --git a/src/stdlib/SDL_getenv.c b/src/stdlib/SDL_getenv.c index 1517b5974b..e058c0c90d 100644 --- a/src/stdlib/SDL_getenv.c +++ b/src/stdlib/SDL_getenv.c @@ -22,7 +22,7 @@ #include "SDL_getenv_c.h" -#if defined(SDL_PLATFORM_WINDOWS) +#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN) #include "../core/windows/SDL_windows.h" #endif @@ -30,7 +30,7 @@ #include "../core/android/SDL_android.h" #endif -#if defined(SDL_PLATFORM_WINDOWS) +#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN) #define HAVE_WIN32_ENVIRONMENT #elif defined(HAVE_GETENV) && \ (defined(HAVE_SETENV) || defined(HAVE_PUTENV)) && \ @@ -103,7 +103,7 @@ SDL_Environment *SDL_CreateEnvironment(bool populated) env->lock = SDL_CreateMutex(); if (populated) { -#ifdef SDL_PLATFORM_WINDOWS +#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN) LPWCH strings = GetEnvironmentStringsW(); if (strings) { for (LPWCH string = strings; *string; string += SDL_wcslen(string) + 1) { @@ -146,7 +146,7 @@ SDL_Environment *SDL_CreateEnvironment(bool populated) SDL_InsertIntoHashTable(env->strings, variable, value, true); } } -#endif // SDL_PLATFORM_WINDOWS +#endif // SDL_PLATFORM_WINDOWS && !SDL_PLATFORM_CYGWIN } return env;