diff --git a/src/physfs_internal.h b/src/physfs_internal.h index 8b221ab..07677c7 100644 --- a/src/physfs_internal.h +++ b/src/physfs_internal.h @@ -15,7 +15,7 @@ #endif /* Turn off MSVC warnings that are aggressively anti-portability. */ -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) #define _CRT_SECURE_NO_WARNINGS 1 #endif diff --git a/src/physfs_platform_windows.c b/src/physfs_platform_windows.c index 49d6f55..1a40302 100644 --- a/src/physfs_platform_windows.c +++ b/src/physfs_platform_windows.c @@ -16,6 +16,10 @@ #undef UNICODE #endif +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) +#define _CRT_SECURE_NO_WARNINGS 1 +#endif + #define WIN32_LEAN_AND_MEAN 1 #include diff --git a/src/physfs_platform_winrt.cpp b/src/physfs_platform_winrt.cpp index 5acc8c4..f50fc9d 100644 --- a/src/physfs_platform_winrt.cpp +++ b/src/physfs_platform_winrt.cpp @@ -17,6 +17,9 @@ #ifdef PHYSFS_PLATFORM_WINRT +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) +#define _CRT_SECURE_NO_WARNINGS 1 +#endif #include #include "physfs_internal.h"