From 55c0b2e7d694ba017edb0a621b17935cb8795d7e Mon Sep 17 00:00:00 2001 From: Bogdan-Andrei Iancu Date: Wed, 31 Jan 2024 14:56:35 +0200 Subject: [PATCH] Force "os_" prefix for all cJSON functions from OpenSIPS core This is needed to avoid any symbol colision with the CJSON public library - this library may end up linked by some OpenSIPS modules (like launch_darkly) and such conflict may raise when using such modules. --- lib/cJSON.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cJSON.h b/lib/cJSON.h index ca56dd0a49b..a65e1106437 100644 --- a/lib/cJSON.h +++ b/lib/cJSON.h @@ -30,6 +30,10 @@ extern "C" { #endif +#ifndef CJSON_PREFIX +#define CJSON_PREFIX os_ +#endif + #ifdef CJSON_PREFIX /* helpers */