mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-09 13:39:47 -05:00
[chromecast] json-c < 0.11 compability
This commit is contained in:
@@ -35,10 +35,14 @@
|
||||
#include <fcntl.h>
|
||||
#include <endian.h>
|
||||
#include <gnutls/gnutls.h>
|
||||
#include <json-c/json.h>
|
||||
|
||||
#include <event2/event.h>
|
||||
|
||||
#ifdef HAVE_JSON_C_OLD
|
||||
# include <json/json.h>
|
||||
#else
|
||||
# include <json-c/json.h>
|
||||
#endif
|
||||
|
||||
#include "conffile.h"
|
||||
#include "mdns.h"
|
||||
#include "logger.h"
|
||||
@@ -705,8 +709,12 @@ cast_msg_parse(struct cast_msg_payload *payload, char *s)
|
||||
static void
|
||||
cast_msg_parse_free(void *haystack)
|
||||
{
|
||||
#ifdef HAVE_JSON_C_OLD
|
||||
json_object_put((json_object *)haystack);
|
||||
#else
|
||||
if (json_object_put((json_object *)haystack) != 1)
|
||||
DPRINTF(E_LOG, L_CAST, "Memleak: JSON parser did not free object\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user