diff --git a/src/xrt/auxiliary/util/u_json.c b/src/xrt/auxiliary/util/u_json.c index 3ff2fd6ca..30105d1a9 100644 --- a/src/xrt/auxiliary/util/u_json.c +++ b/src/xrt/auxiliary/util/u_json.c @@ -9,15 +9,18 @@ */ #include "util/u_json.h" +#ifndef XRT_HAVE_SYSTEM_CJSON +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) +#define _CRT_SECURE_NO_WARNINGS +#endif +#endif + #include "util/u_logging.h" #include #include #ifndef XRT_HAVE_SYSTEM_CJSON -#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) -#define _CRT_SECURE_NO_WARNINGS -#endif // This includes the c file completely. #include "cjson/cJSON.c" #endif