From: Careles Date: Mon, 6 Jan 2025 02:56:53 +0000 (+0800) Subject: fix macro WIN32_LEAN_AND_MEAN redefined X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F884%2Fhead;p=thirdparty%2Fjson-c.git fix macro WIN32_LEAN_AND_MEAN redefined json-c as add_subdirectory and project cmakelists.txt has add_definitions(-DWIN32_LEAN_AND_MEAN) --- diff --git a/json_util.c b/json_util.c index 4da3efb..2b5f858 100644 --- a/json_util.c +++ b/json_util.c @@ -38,7 +38,9 @@ #endif /* HAVE_UNISTD_H */ #ifdef _WIN32 +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #include #endif /* defined(_WIN32) */ diff --git a/linkhash.c b/linkhash.c index 5e12c51..58e1313 100644 --- a/linkhash.c +++ b/linkhash.c @@ -25,7 +25,9 @@ #endif #if defined(_MSC_VER) || defined(__MINGW32__) +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include /* Get InterlockedCompareExchange */ #endif