common: added json-c/JSON-Glib symbol clash hackaround.
authorKrisztian Litkey <krisztian.litkey@intel.com>
Fri, 10 Oct 2014 16:54:19 +0000 (19:54 +0300)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Fri, 10 Oct 2014 17:17:37 +0000 (20:17 +0300)
commit6196a3b49b762d7a84b05f7b34afbce5e28975de
treee45cb5fe3a2d098affb6c3371b32f5dd06708173
parent1ae6dee29118725b077e74fdd32869fc9fb7499b
common: added json-c/JSON-Glib symbol clash hackaround.

json-c and JSON-Glib have a symbol clash on json_object_get_type.
With the latest JSON transport mode changes, if someone ends up
directly or indirectly including both our transport.h, and hence
our json.h, as well as JSON-Glib, we'll trigger the symbol clash.

As a workaround if we detect that JSON-Glib has already been
included we'll compile with alternative signatures (void *,
instead of mrp_json_t *) and omit including json.h. Also we
let people give us a warning by defining __JSON_GLIB_DANGER__
that they will or might include JSON-Glib, in which case
we also compile with the alternative signatures. Oh boy...
src/common/transport.h