From 4ffcde81259c9d1322884987ea061618ff88d52f Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 2 Nov 2022 11:23:03 +0100 Subject: [PATCH] json: Set defines before including shared/jsmn.h --- Makefile.am | 3 +-- src/json.c | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index bc26d052..d5f31a2d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -588,8 +588,7 @@ EXTRA_DIST = src/genbuiltin src/iwd.service.in src/net.connman.iwd.service \ AM_CFLAGS = $(ell_cflags) -fvisibility=hidden \ -DUNITDIR=\""$(top_srcdir)/unit/"\" \ - -DCERTDIR=\""$(top_builddir)/unit/"\" \ - -DJSMN_PARENT_LINKS -DJSMN_STRICT + -DCERTDIR=\""$(top_builddir)/unit/"\" if MAINTAINER_MODE AM_CFLAGS += -DHAVE_PKCS8_SUPPORT diff --git a/src/json.c b/src/json.c index 4cd404ab..a16f6cf4 100644 --- a/src/json.c +++ b/src/json.c @@ -30,6 +30,9 @@ #include "src/json.h" +#define JSMN_STATIC +#define JSMN_STRICT +#define JSMN_PARENT_LINKS #include "shared/jsmn.h" /* Max number of tokens supported. Increase if larger objects are expected */